/*
Theme Name: IAB Next Up
Theme URI: https://iabnextup.be
Author: DigiSense for BAM / IAB Belgium
Description: Block theme for the IAB Next Up mentorship program. Dark-first, built on the 2026 IAB identity: diagonal split, mint headline voice, film grain, self-hosted Archivo. No page builder, no third-party dependency.
Version: 2.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iab-nextup-theme
Tags: block-theme, one-column, custom-colors, custom-logo, full-site-editing
*/

/* -----------------------------------------------------------------------------
   Design tokens live in theme.json. This file carries what theme.json cannot
   express: the brand devices (diagonal split, grain, light beam), the dark
   surface rules, the co-branding lockup and the a11y helpers.

   Contrast notes, measured, because this palette is a trap:
     #00FF9D on #FFFFFF ->  1.33:1  never, under any circumstance
     #00FF9D on #19423C ->  8.38:1  headline-safe
     #00FF9D on #165948 ->  6.18:1  headline-safe (lit end of the hero gradient)
     #00FF9D on #0A0F0D -> 15.9:1   headline-safe
     #FFFFFF on #19423C -> 11.9:1
     #FFFFFF on #165948 ->  8.22:1
     #B7C9C4 on #0A0F0D ->  9.6:1   body copy on dark
   The mint is only ever a background on light surfaces, and only ever type on
   the two dark greens.
   -------------------------------------------------------------------------- */

:root {
	--iab-void: #0a0f0d;
	--iab-green: #19423c;
	/* The lit end of the hero's green field. Same hue family, a touch more
	   saturated, so the gradient reads as light falling across the diagonal
	   rather than as a second colour. */
	--iab-green-lit: #165948cc;
	--iab-mint: #00ff9d;

	/* The hero's green field. Declared once here so every hero on the site
	   shares it - the heroes are generated by a single helper in the plugin, so
	   this is the only place the field is ever defined. */
	--iab-hero-field: linear-gradient(120deg, #19423ccc 0%, var(--iab-green-lit) 100%);

	/* The signature diagonal. One angle, reused everywhere, so the geometry of
	   the site reads as one system rather than a pile of separate decisions. */
	--iab-split-top: 62%;
	--iab-split-bottom: 28%;
	--iab-radius-sm: 12px;
	--iab-radius-md: 24px;
}

/* Short pages (404, thank-you) do not fill the viewport, and the footer is dark
   while the page background is white - the leftover strip below the footer read
   as a rendering bug. Painting the page background dark and pushing the footer
   down with a flex column fixes both the strip and the ragged bottom edge. */
html {
	background: var(--iab-void);
}

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* The header, main and footer are edge-to-edge regions that should touch. Core
   turns the global block gap into a 24px top margin on each of them, and since
   body is white that margin showed up as a stray white strip between the black
   header and the hero. */
.wp-site-blocks > * {
	margin-block: 0;
}

/* Post-content is a non-alignfull child of main, so core's constrained-layout
   rule caps it at the theme's wide size and centres it. Any full-bleed section
   inside could therefore only ever reach the edge of that 1240px column, which
   on a wide desktop reads as a margin around the hero. Releasing the cap here
   is enough: the reading measure still comes from post-content's own
   constrained layout (720px) and the hero and bands carry their own centred
   inner wrappers, so nothing else moves. */
#iab-main > .wp-block-post-content {
	max-width: none;
}

/* --- Page sections ---------------------------------------------------------
   A page is a stack of three kinds of block: the hero, full-bleed dark bands,
   and light sections. A light section is a Group block rendered as <section>,
   one per topic. The space between two blocks is decided by what they are, not
   by where they fall in the page, so one variable sets the rhythm everywhere,
   and a single section can still be given its own spacing from the editor. */
:root {
	--iab-section-gap: 60px;
}

@media (max-width: 781px) {
	:root {
		--iab-section-gap: 40px;
	}
}

/* Reading measure, aligned on the left edge of the wide column so text lines
   up with the hero and band content above it. */
#iab-main > .wp-block-post-content > :where(:not(.alignfull)) {
	max-width: min(var(--wp--style--global--content-size, 720px), 100%);
	margin-inline: max(0px, calc((100% - var(--wp--style--global--wide-size, 1240px)) / 2)) auto !important;
	padding-block: 0;
}

/* Between sections, and between a section and the hero or a dark band on
   either side of it. Hero-to-band and band-to-band keep their own rules. */
#iab-main > .wp-block-post-content > * + .iab-section,
#iab-main > .wp-block-post-content > .iab-section + * {
	margin-block-start: var(--iab-section-gap);
}

/* Breathing room before the footer. */
#iab-main > .wp-block-post-content > .iab-section:last-child {
	padding-block-end: var(--wp--preset--spacing--xl);
}

/* A section whose only content is a shortcode with nothing to show, such as
   the latest mentors before anyone has opted in, must not leave a gap. */
#iab-main > .wp-block-post-content > .iab-section:not(:has(*)) {
	display: none;
}

/* Inside a section: one even step between blocks, well under the gap between
   sections, which is what makes the grouping readable. Direct children only,
   so cards and forms rendered inside a section keep their own spacing. */
.iab-section > * {
	margin-block: 0;
}

.iab-section > * + * {
	margin-block-start: var(--wp--preset--spacing--md);
}

/* Heading rhythm: an eyebrow belongs to the title under it, a title to the
   intro under it, and a sub-heading opens a new beat so it takes more air
   above than below. Components (grids, forms, cards) get extra room so they
   read as the payoff of the text above them. */
.iab-section > .iab-eyebrow + :is(h1, h2, h3),
.iab-band__inner > .iab-eyebrow + :is(h1, h2, h3) {
	margin-block-start: 6px;
}

.iab-section > h2 + p,
.iab-band__inner > h2 + p {
	margin-block-start: 18px;
}

.iab-section > * + h3 {
	margin-block-start: var(--wp--preset--spacing--lg, 40px);
}

.iab-section > h3 + * {
	margin-block-start: 10px;
}

.iab-section > h2 {
	max-width: 28ch;
	text-wrap: balance;
}

.iab-section > p {
	text-wrap: pretty;
}

/* Document-style pages (FAQ, legal): a run of short sections, each titled
   with a real h2 for the outline, but set smaller and ruled apart so they
   read as entries of one list rather than as competing chapters. */
#iab-main > .wp-block-post-content > .iab-section--prose + .iab-section--prose {
	margin-block-start: 0;
	padding-block-start: 32px;
	border-top: 1px solid rgba(3, 15, 11, 0.1);
}

#iab-main > .wp-block-post-content > .iab-section--prose:has(+ .iab-section--prose) {
	padding-block-end: 32px;
}

.iab-section--prose > h2 {
	max-width: none;
	font-size: clamp(21px, 1.1rem + 0.6vw, 26px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.iab-section--prose > h2 + * {
	margin-block-start: 12px;
}

/* The home page's latest-mentors row lays out three cards abreast, which the
   720px reading column cannot hold. Its section takes the wide measure, the
   same one the dark bands use, so its left edge still lines up with the text
   above and below. Its heading and intro keep the reading measure. */
#iab-main > .wp-block-post-content > .iab-section--wide {
	max-width: min(var(--wp--style--global--wide-size, 1240px), 100%);
}

.iab-section--wide .iab-latest > :not(.iab-cards) {
	max-width: var(--wp--style--global--content-size, 720px);
}

/* The footer renders as a plain template-part div, not a <footer> element, so
   it is targeted by position rather than by tag. */
.wp-site-blocks > :last-child {
	margin-top: auto;
}

/* --- Grain -----------------------------------------------------------------
   Two-octave fractal noise, inlined as SVG: one repaint, zero requests. Sits
   above the colour fields and below the type. */
.iab-grain::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.28;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
	background-size: 200px 200px;
}

/* --- Full-bleed break-out --------------------------------------------------
   The hero and the bands sit inside post-content, which sits inside main, and
   main carries the global padding from theme.json.

   Core emits its own break-out rule for constrained containers, with the
   container class repeated - `.wp-container-x.wp-container-x > .alignfull` - so
   it lands at specificity (0,3,0) and beats a plain `.iab-hero`. Worse, it
   cancels the padding via --wp--style--root--padding-left, which this theme
   never emits, so the calc is invalid and the margin collapses to zero, leaving
   the gutter visible. Matching that specificity and pointing at the spacing
   preset that actually produces the padding fixes both halves of the problem.
   Preferred over the 100vw trick, which overflows by the scrollbar width. */
.wp-block-group.iab-hero.alignfull,
.wp-block-group.iab-band.alignfull {
	width: auto;
	max-width: none;
	margin-inline: calc(-1 * var(--wp--preset--spacing--md, 24px));
}

/* --- Hero ------------------------------------------------------------------ */

.iab-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--iab-void);
	color: #fff;
	margin-block-end: 0;
	padding-block: clamp(72px, 13vw, 140px);
	padding-inline: var(--wp--preset--spacing--md);
	min-height: clamp(440px, 62vw, 660px);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* The home hero carries a big two-line title, buttons and the meta row -
   capped so the whole block stays above the fold on desktop viewports. */
body.home .iab-hero {
	padding-block: clamp(48px, 8vw, 96px);
	min-height: clamp(420px, 50vw, 560px);
}

/* The green field, clipped along the signature diagonal. */
.iab-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--iab-hero-field);
	clip-path: polygon(0 0, var(--iab-split-top) 0, var(--iab-split-bottom) 100%, 0 100%);
}

/* The light beam sweeping the dark half, parallel to the split. */
.iab-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -40% -10%;
	background: linear-gradient(
		74deg,
		transparent 0%,
		transparent 52%,
		rgba(0, 255, 157, 0.1) 60%,
		rgba(198, 255, 232, 0.55) 68%,
		rgba(0, 255, 157, 0.12) 74%,
		transparent 84%,
		transparent 100%
	);
	filter: blur(38px);
	opacity: 0.62;
	pointer-events: none;
}

/* Optional photograph. Set --iab-hero-image on the section to switch it on.
   With no image the hero is still complete, which is the point.
   Shown in colour, at the client's request: the grayscale treatment is gone.
   No scrim is needed, because ::before lays an opaque green field over the
   left 28 to 62% of the hero and that is where every line of text sits, so
   the photograph only ever shows on the empty side of the diagonal. */
.iab-hero__media {
	position: absolute;
	inset: 0;
	z-index: -3;
	background-image: var(--iab-hero-image, none);
	background-size: cover;
	background-position: center;
	opacity: 0.78;
	filter: saturate(1.05) contrast(1.02);
}

/* Some photos have their subject on the left, under the green field, where
   the text sits - mirroring the backdrop moves the subject to the empty
   right side. Opt-in per page from the hero builder. */
.iab-hero--flip .iab-hero__media {
	transform: scale(-1, 1);
}

.iab-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1240px);
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 3.5vw, 40px);
}

.iab-hero__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--md);
}

.iab-hero__eyebrow {
	font-weight: 600;
	letter-spacing: -0.01em;
	margin: 0;
	color: #fff;
}

.iab-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	font-size: var(--wp--preset--font-size--body);
	background: rgba(8, 159, 123, 0.18);
	border: 1px solid rgba(8, 159, 123, 0.45);
	border-radius: 999px;
}

/* The date pill. This is the one date the whole programme turns on, so it is
   sized and coloured to read as a headline detail, not as fine print. */
.iab-hero__meta {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 14px 24px;
	font-weight: 700;
	color: #fff;
	font-size: var(--wp--preset--font-size--lead);
	letter-spacing: -0.01em;
	line-height: 1.2;
	background: rgba(0, 255, 157, 0.12);
	border: 1px solid rgba(0, 255, 157, 0.55);
	border-radius: 999px;
}

.iab-hero__meta::before {
	content: "";
	display: inline-block;
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ff9d'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* On a phone the pill would otherwise wrap onto three lines. */
@media (max-width: 600px) {
	.iab-hero__meta {
		padding: 12px 18px;
		font-size: var(--wp--preset--font-size--small);
	}

	.iab-hero__meta::before {
		width: 20px;
		height: 20px;
	}
}

/* The headline. Mint, heavy, tight - the one place the brand actually shouts. */
.iab-hero__title {
	margin: 0;
	max-width: 15ch;
	color: var(--iab-mint);
	font-size: var(--wp--preset--font-size--display);
	font-weight: 800;
	line-height: 0.92;
	letter-spacing: -0.04em;
	text-wrap: balance;
}

.iab-hero__lead {
	margin: 0;
	max-width: 46ch;
	color: rgba(255, 255, 255, 0.86);
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.5;
}

.iab-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding-block-start: 8px;
}

.iab-hero__bottom {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--md);
	margin-block-start: auto;
	padding-block-start: 16px;
}

/* On a phone the diagonal has no room to read as a diagonal, so it flattens
   into a band rather than becoming a sliver of noise. */
@media (max-width: 781px) {
	.iab-hero {
		min-height: 0;
	}

	.iab-hero::before {
		clip-path: polygon(0 0, 100% 0, 100% 72%, 0 92%);
	}

	.iab-hero::after {
		filter: blur(28px);
		opacity: 0.5;
	}

	.iab-hero__title {
		max-width: none;
	}

	.iab-hero__top,
	.iab-hero__bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* --- Hero entrance ---------------------------------------------------------
   One quiet cascade on arrival: the eyebrow, the title, the lead, the buttons
   and the meta pill rise into place, slightly staggered. Time-based rather
   than scroll-driven, because the hero is already in view when the page
   paints. The keyframes carry translate, not transform, so the hover lifts
   further down (which use transform) compose with the settled state instead
   of fighting it. The 404 page has no hero, so its content takes the same
   cascade. */
@media (prefers-reduced-motion: no-preference) {
	.iab-hero__eyebrow,
	.iab-hero__title,
	.iab-hero__lead,
	.iab-hero__actions .wp-block-button,
	.iab-hero__meta,
	body.error404 #iab-main > * {
		animation: iab-rise-in 0.5s cubic-bezier(0.22, 0.9, 0.3, 1) both;
	}

	.iab-hero__title,
	body.error404 #iab-main > *:nth-child(2) {
		animation-delay: 60ms;
	}

	.iab-hero__lead,
	body.error404 #iab-main > *:nth-child(3) {
		animation-delay: 120ms;
	}

	.iab-hero__actions .wp-block-button,
	body.error404 #iab-main > *:nth-child(4) {
		animation-delay: 180ms;
	}

	.iab-hero__actions .wp-block-button + .wp-block-button {
		animation-delay: 240ms;
	}

	.iab-hero__meta {
		animation-delay: 300ms;
	}
}

@keyframes iab-rise-in {
	from {
		opacity: 0;
		translate: 0 14px;
	}
}

/* --- Dark bands ------------------------------------------------------------ */

.iab-band {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: #fff;
	padding-block: var(--wp--preset--spacing--xl);
	padding-inline: var(--wp--preset--spacing--md);
}

/* The first band after the hero touches the hero. This matters because the hero
   still has its own bottom padding; adding a band gap created a dark "ledge"
   instead of one continuous field. */
.iab-hero + .iab-band {
	padding-block-start: 0;
}

/* Two bands in a row read as one dark field. */
.iab-band + .iab-band {
	padding-block-start: 0;
}

.iab-band:has(+ .iab-band) {
	padding-block-end: 0;
}

.iab-band--void {
	background: var(--iab-void);
}

.iab-band--green {
	background: var(--iab-green);
}

/* A corner wedge: the diagonal again, quieter, so interior sections belong to
   the same family as the hero without competing with it. */
.iab-band--wedge::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, 0.04);
	clip-path: polygon(100% 0, 100% 100%, 42% 100%);
}

.iab-band__inner {
	max-width: var(--wp--style--global--wide-size, 1240px);
	margin-inline: auto;
	/* The band already carries the gutter. Core adds the root padding again here
	   because this wrapper sits inside an alignfull flow parent, which exempts it
	   from the usual nested-padding reset - and that made the band's measure 24px
	   narrower than the hero's on the same page. */
	padding-inline: 0;
}

/* Running text in a band keeps a readable measure, but aligned to the band's
   left edge rather than centred, so it lines up with the eyebrow, the heading
   and the card grid above and below it. */
.iab-band__inner > * {
	margin-block: 0;
}

.iab-band__inner > * + * {
	margin-block-start: var(--wp--preset--spacing--md);
}

.iab-band__inner h2 {
	font-size: var(--wp--preset--font-size--h-2);
	line-height: 1.05;
	letter-spacing: -0.025em;
}

/* Running text in a band keeps a readable measure, aligned to the band's left
   edge so it lines up with the eyebrow, the heading and the card grid. */
.iab-band__inner > p {
	max-width: 68ch;
}

.iab-band__inner > p + p {
	margin-block-start: 1em;
}

.iab-band :where(h2, h3) {
	color: #fff;
}

.iab-band .iab-accent-text {
	color: var(--iab-mint);
}

.iab-band :where(p, li) {
	color: rgba(255, 255, 255, 0.82);
}

/* --- Marketing tiles ----------------------------------------------------------------- */

.iab-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--wp--preset--spacing--md);
}

/* Core's block gap adds a top margin to every sibling group after the first,
   which staggers the tiles in the grid. The grid gap already spaces them. */
.iab-tiles > .iab-tile {
	margin-block: 0;
}

.iab-tile {
	padding: var(--wp--preset--spacing--md);
	border-radius: var(--iab-radius-md);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.12);
	display: flex;
	flex-direction: column;
	transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 220ms ease;
}

.iab-tile h3 {
	margin-block: 0 8px;
	color: var(--iab-mint);
}

.iab-tile p {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
}

/* On a light surface the same card inverts and the mint drops out of the type. */
.iab-tiles--light .iab-tile {
	background: var(--wp--preset--color--primary-soft);
	border-color: rgba(25, 66, 60, 0.14);
}

.iab-tiles--light .iab-tile h3 {
	color: var(--wp--preset--color--primary);
}

.iab-tiles--light .iab-tile p {
	color: var(--wp--preset--color--ink-soft);
}

/* A quiet lift on hover, mirroring the sponsor tiles: the card rises a few
   pixels and its border picks up an accent. */
.iab-tile:hover {
	transform: translateY(-4px);
	border-color: rgba(0, 255, 157, 0.45);
}

/* On light the mint border would read as a halo, so the accent stays in the
   green family there. */
.iab-tiles--light .iab-tile:hover {
	border-color: rgba(25, 66, 60, 0.45);
}

/* --- Numbered flow -------------------------------------------------------- */

.iab-flow {
	counter-reset: iab-flow;
	display: grid;
	gap: 1px;
	background: var(--wp--preset--color--muted);
	border-block: 1px solid var(--wp--preset--color--muted);
}

.iab-flow__item {
	counter-increment: iab-flow;
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: var(--wp--preset--spacing--md);
	padding-block: var(--wp--preset--spacing--lg);
	background: var(--wp--preset--color--surface);
	/* Core's block-gap rule puts a 24px top margin on every sibling group.
	   Inside a grid whose background is the divider colour, that margin reads
	   as a fat grey band instead of a hairline, so it is cancelled here. */
	margin-block: 0;
}

.iab-flow__item::before {
	content: counter(iab-flow, decimal-leading-zero);
	font-size: var(--wp--preset--font-size--h-2);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--wp--preset--color--primary);
}

.iab-flow__item h3 {
	margin-block: 0 8px;
}

.iab-flow__item p {
	margin: 0;
	color: var(--wp--preset--color--ink-soft);
}

@media (max-width: 600px) {
	.iab-flow__item {
		grid-template-columns: 1fr;
		gap: 8px;
	}
}

/* The steps rise into view one after another as the column is scrolled, and
   each numeral settles from slightly large to rest - an accent that never
   leaves the safe palette. Scroll-driven like the timeline and the logo wall:
   no script, and browsers without scroll timelines simply show the steps.
   Because the items stack vertically, each one enters the viewport at its own
   scroll position, which is the whole stagger. */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.iab-flow__item {
			animation: iab-flow-in linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 45%;
		}

		.iab-flow__item::before {
			animation: iab-flow-numeral linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 45%;
		}
	}
}

@keyframes iab-flow-in {
	from {
		opacity: 0;
		translate: 0 20px;
	}
}

@keyframes iab-flow-numeral {
	from {
		scale: 1.1;
		color: var(--wp--preset--color--primary-deep, #0f2b27);
	}
}

/* --- Header ---------------------------------------------------------------- */

.iab-header {
	position: relative;
	z-index: 10;
}

.iab-header .wp-block-navigation a {
	color: #fff;
	text-decoration: none;
	font-weight: 500;
	position: relative;
	transition: color 150ms ease;
}

.iab-header .wp-block-navigation a:hover {
	color: var(--iab-mint);
	text-decoration: none;
}

/* The link draws a mint underline in from the left while hovered or focused,
   and keeps it on the current page - a cue that lands before the colour
   change finishes, for the pointer and the keyboard alike. */
.iab-header .wp-block-navigation a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 2px;
	border-radius: 999px;
	background: var(--iab-mint);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 180ms ease;
}

.iab-header .wp-block-navigation a:hover::after,
.iab-header .wp-block-navigation a:focus-visible::after,
.iab-header .wp-block-navigation a[aria-current="page"]::after {
	transform: scaleX(1);
}

/* The overlay menu. Core paints it white with a stronger selector, which left
   white links on white; the doubled class wins without !important. */
.iab-header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open.is-menu-open {
	background: var(--iab-hero-field, var(--iab-void));
	color: #fff;
	padding: 24px;
}

.iab-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 72px;
}

.iab-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 22px;
}

.iab-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

/* Below 1000px the four links and two buttons no longer fit next to the brand,
   so the menu collapses into the toggle there, not only under core's 600px. The
   toggle goes to the far right, after the buttons, and the header stays one row. */
@media (max-width: 1000px) {
	.iab-header > .wp-block-group,
	.iab-header > .wp-block-group > .wp-block-group {
		flex-wrap: nowrap;
	}

	.iab-header > .wp-block-group > .wp-block-group {
		gap: 14px;
	}

	.iab-header .wp-block-buttons {
		flex-wrap: nowrap;
	}

	.iab-header .wp-block-navigation {
		order: 2;
	}

	.iab-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.iab-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.iab-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		display: flex;
	}
}

.iab-header .wp-block-navigation__responsive-container-open svg,
.iab-header .wp-block-navigation__responsive-container-close svg {
	width: 30px;
	height: 30px;
}

.iab-header .wp-block-navigation__responsive-container-close,
.iab-header .wp-block-navigation__responsive-container-open {
	color: #fff;
}

/* --- Micro-interactions ----------------------------------------------------
   Small, uniform feedback everywhere: every button eases its colours and
   lifts two pixels on hover, every link eases its colour change. The lifts
   use transform on purpose - the entrance animations higher up hold translate,
   and the two properties compose rather than fight. */
.wp-element-button {
	transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.wp-element-button:hover {
	transform: translateY(-2px);
}

a {
	transition: color 150ms ease;
}

/* --- Buttons on dark ------------------------------------------------------- */

.iab-hero .wp-element-button,
.iab-band .wp-element-button,
.iab-header .wp-element-button {
	background: var(--iab-mint);
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--iab-mint);
}

.iab-hero .wp-element-button:hover,
.iab-band .wp-element-button:hover,
.iab-header .wp-element-button:hover {
	background: #fff;
	border-color: #fff;
	color: var(--wp--preset--color--ink);
}

.iab-hero .is-style-outline .wp-element-button,
.iab-band .is-style-outline .wp-element-button,
.iab-header .is-style-outline .wp-element-button {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.45);
}

.iab-hero .is-style-outline .wp-element-button:hover,
.iab-band .is-style-outline .wp-element-button:hover,
.iab-header .is-style-outline .wp-element-button:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: #fff;
	color: #fff;
}

/* The header buttons are secondary to the hero's, so they run one step down in
   size and padding - otherwise two mint pills fight for the same attention. */
.iab-header .wp-element-button {
	padding: 10px 20px;
}

/* Below this width the two header CTAs plus the menu toggle cannot share a line,
   and because a pill cannot wrap its label they pushed the whole document wider
   than the viewport - every section then overflowed, not just the header. The
   outline CTA is the one to drop: both registration routes stay one tap away in
   the overlay menu and in the hero. */
@media (max-width: 600px) {
	.iab-header .wp-block-button.is-style-outline {
		display: none;
	}

	.iab-header .wp-element-button {
		padding: 9px 14px;
		white-space: nowrap;
	}
}

.iab-band a:not(.wp-element-button) {
	color: var(--iab-mint);
}

/* --- Accessibility --------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 4px;
}

/* On dark surfaces the green ring disappears, so the mint takes over - it has
   15.9:1 there and is the most visible thing on the page. */
.iab-hero :focus-visible,
.iab-band :focus-visible,
.iab-header :focus-visible,
.iab-footer :focus-visible {
	outline-color: var(--iab-mint);
}

.iab-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 12px 20px;
	background: var(--iab-mint);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
	border-radius: 0 0 var(--iab-radius-sm) 0;
}

.iab-skip-link:focus {
	left: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* --- Brand wordmark --------------------------------------------------------
   Site-wide logo: the event name, doubling as the home link, in the header
   and footer. The accent on "Up" carries the mark; the header additionally
   prefixes the IAB Belgium logo. */

.iab-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.2em;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1;
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
}

/* White-on-transparent artwork, so it only works on the dark header.
   The extra margin sits on top of the 0.2em word gap to separate the logo
   from the wordmark without loosening "Next Up" itself. */
.iab-brand__logo {
	display: block;
	width: auto;
	height: 26px;
	margin-right: 6px;
}

/* Header size steps: 48px mark and 28px wordmark on desktop, easing down so
   the brand never crowds the navigation or the two buttons. */
.iab-header .iab-brand {
	font-size: 28px;
	letter-spacing: -0.02em;
}

.iab-header .iab-brand__logo {
	height: 48px;
	margin-right: 10px;
}

@media (max-width: 1000px) {
	.iab-header .iab-brand {
		font-size: 24px;
	}

	.iab-header .iab-brand__logo {
		height: 40px;
		margin-right: 8px;
	}
}

@media (max-width: 600px) {
	.iab-header .iab-brand {
		font-size: 21px;
	}

	.iab-header .iab-brand__logo {
		height: 32px;
		margin-right: 4px;
	}
}

.iab-brand span {
	color: var(--iab-mint);
}

.iab-brand:hover,
.iab-brand:focus-visible {
	color: var(--iab-mint);
}

.iab-brand:hover span,
.iab-brand:focus-visible span {
	color: #fff;
}

.iab-footer .iab-brand {
	font-size: 18px;
}

/* --- Small type devices ---------------------------------------------------- */

.iab-accent-rule {
	display: block;
	width: 56px;
	height: 4px;
	border-radius: 999px;
	background: var(--iab-mint);
	margin: 0 0 20px;
}

.iab-eyebrow {
	display: block;
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin-block-end: 8px;
}

.iab-band .iab-eyebrow,
.iab-footer .iab-eyebrow,
.has-primary-background-color .iab-eyebrow,
.has-primary-deep-background-color .iab-eyebrow,
.has-void-background-color .iab-eyebrow {
	color: var(--iab-mint);
}

/* --- Sponsor wall -----------------------------------------------------------
   Every logo sits on the same white tile and is sized by area rather than by
   height (the width comes inline from the page builder as --iab-logo-w), so a
   long wordmark and a square mark carry the same weight. Rank is carried by
   tile size and by the ledger of tiers, never by fading anyone out. */

.iab-section--wide > p {
	max-width: var(--wp--style--global--content-size, 720px);
}

.iab-section > .iab-wall,
.iab-section > .iab-tiers {
	margin-block-start: 36px;
}

.iab-wall {
	display: grid;
	grid-template-columns: repeat(var(--iab-cols, 5), minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.iab-wall__tile {
	position: relative;
	display: grid;
	grid-template: minmax(0, 1fr) / minmax(0, 1fr);
	place-items: center;
	aspect-ratio: var(--iab-tile-ratio, 3 / 2);
	margin: 0;
	padding: 10% 12%;
	box-sizing: border-box;
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid rgba(3, 15, 11, 0.1);
	border-radius: 16px;
	transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 220ms ease, box-shadow 220ms ease;
}

.iab-wall__tile img {
	display: block;
	width: var(--iab-logo-w, 60%);
	height: auto;
	max-height: 100%;
	object-fit: contain;
	transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.iab-wall__tile:hover {
	transform: translateY(-3px);
	border-color: rgba(25, 66, 60, 0.45);
	box-shadow: 0 18px 36px -22px rgba(15, 43, 39, 0.45);
}

.iab-wall__tile:hover img {
	transform: scale(1.04);
}

.iab-wall__tile--dark {
	background: var(--iab-hero-field);
	border-color: transparent;
}

.iab-wall--founding {
	--iab-cols: 3;
	--iab-tile-ratio: 16 / 9;
	gap: 20px;
}

.iab-wall--lead {
	--iab-cols: 5;
}

.iab-wall--platinum {
	--iab-cols: 2;
	--iab-tile-ratio: 2 / 1;
}

.iab-wall--platinum .iab-wall__tile {
	border-color: rgba(3, 15, 11, 0.14);
	background:
		radial-gradient(120% 90% at 0% 0%, rgba(0, 255, 157, 0.07), transparent 60%),
		var(--wp--preset--color--surface, #fff);
	box-shadow: 0 22px 44px -30px rgba(15, 43, 39, 0.5);
}

.iab-wall--gold {
	--iab-cols: 5;
}

.iab-wall--silver {
	--iab-cols: 6;
	gap: 12px;
}

/* The ledger. One row per tier: the tier's name and a metallic rule on the
   left, its members on the right. */
.iab-tiers {
	container-type: inline-size;
	border-bottom: 1px solid rgba(3, 15, 11, 0.12);
}

.iab-tier {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
	padding-block: 36px;
	border-top: 1px solid rgba(3, 15, 11, 0.12);
}

.iab-tier__swatch {
	display: block;
	width: 44px;
	height: 5px;
	margin: 0 0 14px;
	border-radius: 999px;
	background: var(--iab-tier-metal, var(--iab-mint));
}

.iab-tier--platinum {
	--iab-tier-metal: linear-gradient(100deg, #f1f2f3 0%, #a9aeb4 45%, #eef0f2 70%, #b4b9be 100%);
}

.iab-tier--gold {
	--iab-tier-metal: linear-gradient(100deg, #f8e7a3 0%, #c8962a 45%, #f4d67c 70%, #b98a22 100%);
}

.iab-tier--silver {
	--iab-tier-metal: linear-gradient(100deg, #f3f3f3 0%, #b3b7bb 45%, #e9eaeb 70%, #9fa4a9 100%);
}

.iab-tier__name.iab-tier__name {
	margin: 0;
	font-size: clamp(24px, 2.2vw, 30px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.iab-tier__note.iab-tier__note {
	margin: 6px 0 0;
	font-size: 14px;
	color: var(--wp--preset--color--ink-soft, #5b6b66);
}

@container (max-width: 860px) {
	.iab-tier {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
		padding-block: 28px;
	}

	.iab-tier__label {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		column-gap: 14px;
	}

	.iab-tier__swatch {
		flex-basis: 100%;
		margin-bottom: 10px;
	}

	.iab-wall--lead {
		--iab-cols: 4;
	}
}

@container (max-width: 560px) {
	.iab-wall--gold,
	.iab-wall--silver,
	.iab-wall--lead {
		--iab-cols: 3;
	}

	.iab-wall--platinum {
		--iab-cols: 1;
	}
}

@container (max-width: 380px) {
	.iab-wall--gold,
	.iab-wall--silver,
	.iab-wall--lead {
		--iab-cols: 2;
	}
}

@media (max-width: 700px) {
	.iab-wall--founding {
		--iab-cols: 1;
		--iab-tile-ratio: 5 / 2;
		gap: 12px;
	}
}

/* Tiles rise into place as the ledger scrolls into view, in a short stagger
   along each row. Scroll-driven, so it costs no JavaScript; browsers without
   scroll timelines simply show the logos. */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.iab-wall__tile {
			animation: iab-tile-rise linear both;
			animation-timeline: view();
			animation-range: entry calc(var(--iab-i, 0) * 5%) entry calc(60% + var(--iab-i, 0) * 5%);
		}
	}
}

@keyframes iab-tile-rise {
	from {
		opacity: 0;
		translate: 0 18px;
	}
}

/* --- Footer ---------------------------------------------------------------- */

.iab-footer.iab-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 40px !important;
}

.iab-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--iab-void);
	clip-path: polygon(100% 0, 100% 100%, 55% 100%);
}

.iab-footer a {
	color: rgba(255, 255, 255, 0.86);
	text-decoration: none;
}

.iab-footer a:hover {
	color: var(--iab-mint);
	text-decoration: underline;
}

.iab-footer__list {
	list-style: none;
	padding: 0;
	margin: 0;
}

/* Bottom bar: brand + contact stacked on the left, external links and
   copyright to the right. The contact line sits right under the brand. */
.iab-footer__identity {
	margin: 0;
}

.iab-footer__identity .iab-brand {
	display: inline-block;
}

.iab-footer__contact {
	margin: 4px 0 0;
}

.iab-footer__contact a {
	color: #a8bcb7;
}

.iab-footer__external {
	margin: 0;
}

.iab-footer__external a {
	color: #a8bcb7;
}

/* --- Motion ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* The grain is static, but it is still heavy visual noise for anyone who asked
   for calm. Drop it rather than try to soften it. */
@media (prefers-reduced-transparency: reduce) {
	.iab-grain::after {
		display: none;
	}
}

@media (forced-colors: active) {
	.iab-hero::before,
	.iab-hero::after,
	.iab-grain::after,
	.iab-footer::before {
		display: none;
	}
}

/* Cookie-Script declaration on the legal page */
.iab-cookie-report { font-size: 15px; line-height: 1.5; }
.iab-cookie-report table._CookieScriptReportPageTable { width: 100%; border-collapse: collapse; margin: 0.5em 0 1.75em; font-size: 14px; }
.iab-cookie-report table th,
.iab-cookie-report td { padding: 10px 12px; border: 0; border-bottom: 1px solid rgba(3, 15, 11, 0.12); text-align: left; vertical-align: top; }
.iab-cookie-report th { font-weight: 600; background: rgba(8, 159, 123, 0.08); }
.iab-cookie-report td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; white-space: nowrap; }
.iab-cookie-report input[type="checkbox"] { accent-color: #089f7b; }
.iab-cookie-report label { margin-right: 14px; white-space: nowrap; }
.iab-cookie-report button,
.iab-cookie-report input[type="button"],
.iab-cookie-report input[type="submit"] { font: inherit; font-weight: 600; font-size: 14px; padding: 8px 18px; border: 0; border-radius: 999px; background: #030f0b; color: #fff; cursor: pointer; }
.iab-cookie-report button:hover { background: #089f7b; }

/* -------------------------------------------------------
 * Home timeline
 * ----------------------------------------------------- */
.iab-timeline {
	position: relative;
	display: grid;
	grid-template-columns: repeat( 5, 1fr );
	gap: 28px;
	margin: 56px 0 24px;
	padding: 0;
	list-style: none;
}

.iab-section > .iab-timeline { margin-block-start: 56px; }

/* The connecting rail */
.iab-timeline::before {
	content: "";
	position: absolute;
	top: 27px;
	left: 4%;
	right: 4%;
	height: 2px;
	background: linear-gradient( 90deg, rgba( 8, 159, 123, 0.15 ), var( --iab-mint, #00ff9e ) 50%, rgba( 8, 159, 123, 0.15 ) );
}

.iab-timeline__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
	padding-top: 0;
}

.iab-timeline__dot {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var( --iab-mint, #00ff9e );
	color: #089f7b;
	box-shadow: 0 4px 14px rgba( 8, 159, 123, 0.18 );
}

.iab-timeline__dot svg {
	width: 26px;
	height: 26px;
}

.iab-timeline__when {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #089f7b;
}

.iab-timeline__title {
	font-size: 16px;
	font-weight: 600;
}

.iab-timeline__body {
	font-size: 14px;
	line-height: 1.55;
	color: rgba( 3, 15, 11, 0.72 );
}

/* Cascade reveal, scroll-driven where supported */
@keyframes iab-timeline-in {
	from { opacity: 0; transform: translateY( 22px ); }
	to   { opacity: 1; transform: none; }
}

/* Wrapped in no-preference on purpose: a scroll-driven animation ignores
   animation-duration, so the global kill switch in the motion section cannot
   stop it - without this guard the items would stay hidden until scrolled
   even for visitors who asked for calm. */
@media (prefers-reduced-motion: no-preference) {
	@supports ( animation-timeline: view() ) {
		.iab-timeline__item {
			animation: iab-timeline-in 0.7s cubic-bezier( 0.22, 0.9, 0.3, 1 ) both;
			animation-timeline: view();
			animation-range: entry 5% entry 45%;
			animation-delay: calc( ( var( --iab-i ) - 1 ) * 90ms );
		}
	}
}

@media ( max-width: 900px ) {
	.iab-timeline {
		grid-template-columns: 1fr;
		gap: 40px;
		max-width: 460px;
		margin-inline: auto;
	}

	.iab-timeline::before {
		top: 20px;
		bottom: 20px;
		left: 27px;
		right: auto;
		width: 2px;
		height: auto;
		background: linear-gradient( 180deg, rgba( 8, 159, 123, 0.15 ), var( --iab-mint, #00ff9e ) 50%, rgba( 8, 159, 123, 0.15 ) );
	}

	.iab-timeline__item {
		display: grid;
		grid-template-columns: 56px 1fr;
		grid-template-rows: auto auto auto;
		column-gap: 16px;
		align-items: start;
		text-align: left;
	}

	.iab-timeline__dot { grid-row: 1 / 4; }

	.iab-section > .iab-timeline { margin-block-start: 40px; }

	.iab-timeline__item { row-gap: 6px; }
}
