/* Solar Team Twente Rally - main stylesheet. Written for this theme. */

/* ---------- Tokens ---------- */
:root {
	--red: #e63020;
	--red-dark: #b3200f;
	--ink: #14110f;
	--ink-2: #2a2522;
	--muted: #5f5853;
	--soft: #f6f3f0;
	--line: #e6e0da;
	--white: #fff;
	--radius: 14px;
	--container: 1200px;
	--gutter: clamp(20px, 4vw, 48px);
	--header-h: 76px;
	--font: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--shadow: 0 10px 30px rgba(20, 17, 15, 0.1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.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;
}
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; margin: 0; padding: 12px 18px; clip: auto; background: var(--white); color: var(--ink); border-radius: 8px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--soft { background: var(--soft); }
.section__head { margin-bottom: clamp(24px, 3vw, 40px); }
.section__head h2 { margin: 0; }
.section__head--split { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }

.eyebrow {
	display: flex; align-items: center; gap: 12px; margin: 0 0 18px;
	font-size: 0.82rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 34px; height: 3px; background: var(--red); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn, .wp-block-button__link {
	display: inline-flex; align-items: center; gap: 0.6em; padding: 0.9em 1.7em;
	font: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
	border: 2px solid transparent; border-radius: 999px;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn .icon { width: 1.15em; height: 1.15em; }
.btn:hover, .wp-block-button__link:hover { transform: translateY(-2px); }
.btn--primary, .wp-block-button__link { background: var(--red); color: var(--white); }
.btn--primary:hover, .wp-block-button__link:hover { background: var(--red-dark); color: var(--white); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--ink); color: var(--white); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.75); }
.btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn-row, .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.text-link .icon { width: 1.1em; height: 1.1em; transition: transform 0.2s; }
.text-link:hover .icon { transform: translateX(4px); }
.join-cta .btn--light:hover {
	background: var(--red);
	color: var(--white);
}
.join-cta .btn--ghost:hover {
	background: var(--red);
	border-color: var(--red);
	color: var(--white);
}

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; color: var(--white); }
.site-header::before, .site-header::after { content: ""; position: absolute; inset: 0; pointer-events: none; transition: opacity 0.4s ease; }
.site-header::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); height: calc(var(--header-h) + 36px); }
.site-header::after { background: var(--red); opacity: 0; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18); height: var(--header-h); }
.site-header.is-scrolled::before { opacity: 0; }
.site-header.is-scrolled::after { opacity: 1; }
body.nav-open .site-header::before, body.nav-open .site-header::after { opacity: 0; }
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

.site-header__bar {
	position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 24px;
	height: var(--header-h); max-width: calc(1440px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
}
.site-logo { display: block; flex: none; position: relative; z-index: 3; }
.site-logo img { height: 58px; width: auto; filter: brightness(0) invert(1); }
@media (max-width: 600px) { .site-logo img { height: 50px; } }

.site-nav .menu { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 34px); list-style: none; margin: 0; padding: 0; }
.site-nav .menu a { position: relative; display: block; padding: 8px 0; color: var(--white); font-size: 0.97rem; font-weight: 700; text-decoration: none; }
.site-nav .menu li:not(.menu-cta) a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: currentColor;
	transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}
.site-nav .menu li:not(.menu-cta) a:hover::after,
.site-nav .menu .current-menu-item > a::after { transform: scaleX(1); }
.site-nav .menu-cta a { padding: 10px 22px; background: var(--white); color: var(--red); border-radius: 999px; transition: background-color 0.2s, color 0.2s; }
.site-nav .menu-cta a:hover { background: var(--ink); color: var(--white); }
.site-header.is-scrolled .menu-cta a:hover { background: var(--ink); color: var(--white); }
.site-nav__foot { display: none; }

.nav-toggle {
	display: none; position: relative; z-index: 3; flex: none; width: 48px; height: 48px; margin-right: -10px;
	background: none; border: 0; color: inherit; cursor: pointer;
}
.nav-toggle__bars { position: absolute; left: 12px; top: 15px; width: 24px; height: 18px; }
.nav-toggle__bars span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.3s, opacity 0.2s, top 0.3s; }
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 8px; }
.nav-toggle__bars span:nth-child(3) { top: 16px; }
body.nav-open .nav-toggle__bars span:nth-child(1) { top: 8px; transform: rotate(45deg); }
body.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle__bars span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* Dropdowns */
.site-nav .menu-item-has-children { position: relative; display: flex; flex-wrap: wrap; align-items: center; }
.submenu-toggle { flex: none; width: 28px; height: 28px; margin-left: 2px; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; border-radius: 50%; }
.submenu-toggle__chev { display: block; width: 8px; height: 8px; margin: -3px auto 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 0.2s; }
.menu-item-has-children.is-open > .submenu-toggle .submenu-toggle__chev { margin-top: 3px; transform: rotate(-135deg); }
.site-nav .sub-menu { list-style: none; margin: 0; padding: 0; }
.site-nav .sub-menu a::after { display: none; }
.site-nav .current-menu-ancestor > a::after, .site-nav .current-menu-parent > a::after { transform: scaleX(1); }

@media (min-width: 1100px) {
	body:not(.nav-always-hamburger) .site-nav .sub-menu {
		position: absolute; top: 100%; left: -16px; z-index: 5; width: max-content; min-width: 0; max-width: 320px; padding: 8px;
		background: var(--white); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(20, 17, 15, 0.22);
		visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
	}
	body:not(.nav-always-hamburger) .site-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
	body:not(.nav-always-hamburger) .site-nav .menu-item-has-children:hover > .sub-menu,
	body:not(.nav-always-hamburger) .site-nav .menu-item-has-children:focus-within > .sub-menu,
	body:not(.nav-always-hamburger) .site-nav .menu-item-has-children.is-open > .sub-menu { visibility: visible; opacity: 1; transform: none; }
	body:not(.nav-always-hamburger) .site-nav .sub-menu a { padding: 8px 14px; color: var(--ink); font-size: 0.97rem; white-space: nowrap; border-radius: 8px; }
	body:not(.nav-always-hamburger) .site-nav .sub-menu a:hover,
	body:not(.nav-always-hamburger) .site-nav .sub-menu .current-menu-item > a { background: var(--soft); color: var(--red); }
}

/* Hamburger: phones and tablets, or everywhere when chosen in the settings */
@media (max-width: 1099px) {
	.nav-toggle { display: block; }
	.site-nav {
		position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center;
		padding: calc(var(--header-h) + 20px) var(--gutter) 40px; background: var(--ink); overflow-y: auto;
		visibility: hidden; opacity: 0; transition: opacity 0.35s, visibility 0.35s;
	}
	body.nav-open .site-nav { visibility: visible; opacity: 1; }
	.site-nav .menu { flex-direction: column; align-items: flex-start; gap: 4px; }
	.site-nav .menu a { padding: 6px 0; font-size: clamp(1.7rem, 7vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }
	.site-nav .menu li { opacity: 0; transform: translateY(14px); transition: opacity 0.4s, transform 0.4s; }
	body.nav-open .site-nav .menu li { opacity: 1; transform: none; }
	body.nav-open .site-nav .menu li:nth-child(2) { transition-delay: 0.05s; }
	body.nav-open .site-nav .menu li:nth-child(3) { transition-delay: 0.1s; }
	body.nav-open .site-nav .menu li:nth-child(4) { transition-delay: 0.15s; }
	body.nav-open .site-nav .menu li:nth-child(5) { transition-delay: 0.2s; }
	body.nav-open .site-nav .menu li:nth-child(6) { transition-delay: 0.25s; }
	body.nav-open .site-nav .menu li:nth-child(7) { transition-delay: 0.3s; }
	body.nav-open .site-nav .menu li:nth-child(8) { transition-delay: 0.35s; }
	.site-nav .menu-cta { margin-top: 18px; }
	.site-nav .menu-cta a { background: var(--red); color: var(--white); font-size: 1.2rem; padding: 14px 30px; }
	.site-nav__foot { display: block; margin-top: 36px; }

	/* dropdowns inside the full-screen menu: folded open under the parent */
	.site-nav .menu-item-has-children { align-items: center; }
	.submenu-toggle { width: 44px; height: 44px; margin-left: 6px; }
	.submenu-toggle__chev { width: 12px; height: 12px; }
	.site-nav .sub-menu { flex: 0 0 100%; padding-left: 18px; border-left: 3px solid var(--red); margin: 4px 0 10px; }
	.site-nav .sub-menu a { font-size: clamp(1.25rem, 5vw, 1.7rem); font-weight: 700; color: rgba(255, 255, 255, 0.88); }
	.js .site-nav .sub-menu { display: none; }
	.js .site-nav .menu-item-has-children.is-open > .sub-menu { display: block; }
}
body.nav-always-hamburger .nav-toggle { display: block; }
@media (min-width: 1100px) {
	body.nav-always-hamburger .site-nav {
		position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center;
		padding: calc(var(--header-h) + 20px) var(--gutter) 40px; background: var(--ink); overflow-y: auto;
		visibility: hidden; opacity: 0; transition: opacity 0.35s, visibility 0.35s;
	}
	body.nav-always-hamburger.nav-open .site-nav { visibility: visible; opacity: 1; }
	body.nav-always-hamburger .site-nav .menu { flex-direction: column; align-items: flex-start; gap: 4px; }
	body.nav-always-hamburger .site-nav .menu a { font-size: 2.6rem; font-weight: 800; padding: 6px 0; }
	body.nav-always-hamburger .site-nav .menu-cta a { background: var(--red); color: var(--white); font-size: 1.2rem; padding: 14px 30px; }
	body.nav-always-hamburger .site-nav__foot { display: block; margin-top: 36px; }

	/* dropdowns inside the full-screen menu: folded open under the parent */
	body.nav-always-hamburger .site-nav .menu-item-has-children { align-items: center; }
	body.nav-always-hamburger .submenu-toggle { width: 44px; height: 44px; margin-left: 6px; }
	body.nav-always-hamburger .submenu-toggle__chev { width: 12px; height: 12px; }
	body.nav-always-hamburger .site-nav .sub-menu { flex: 0 0 100%; padding-left: 18px; border-left: 3px solid var(--red); margin: 4px 0 10px; }
	body.nav-always-hamburger .site-nav .sub-menu a { font-size: clamp(1.25rem, 5vw, 1.7rem); font-weight: 700; color: rgba(255, 255, 255, 0.88); }
	.js body.nav-always-hamburger .site-nav .sub-menu { display: none; }
	.js body.nav-always-hamburger .site-nav .menu-item-has-children.is-open > .sub-menu { display: block; }
}

/* ---------- Socials ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.socials a {
	display: grid; place-items: center; width: 46px; height: 46px; color: var(--white);
	border: 1.5px solid rgba(255, 255, 255, 0.45); border-radius: 50%; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.socials a:hover { background: var(--white); color: var(--red); border-color: var(--white); }
.socials .icon { width: 22px; height: 22px; }
.socials--dark a { color: var(--ink); border-color: var(--line); }
.socials--dark a:hover { background: var(--red); color: var(--white); border-color: var(--red); }

/* ---------- Home hero ---------- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: 100vh; min-height: 100svh; padding: calc(var(--header-h) + 40px) 0 clamp(48px, 10vh, 110px); color: var(--white); background: var(--ink); overflow: hidden; }
.hero__media, .hero__media img, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media img, .hero__video { object-fit: cover; }
.hero__video { opacity: 0; transition: opacity 1s; }
.hero__video.is-playing { opacity: 1; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.1) 35%, rgba(0, 0, 0, 0.72) 100%), linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 60%); }
.hero__content { position: relative; }
.hero__title { max-width: 14ch; margin: 0 0 22px; font-size: clamp(2.9rem, 8.4vw, 7rem); line-height: 0.98; letter-spacing: -0.035em; }
.hero__text { max-width: 36rem; margin: 0; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; color: rgba(255, 255, 255, 0.92); }
.hero .eyebrow::before { background: var(--red); }

/* ---------- Page hero ---------- */
.page-hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(340px, 60vh, 520px); padding: calc(var(--header-h) + 40px) 0 clamp(24px, 2.5vw, 32px); color: var(--white); background: var(--ink); overflow: hidden; }
.page-hero__media, .page-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.75)); }
.page-hero__inner { position: relative; }
.page-hero__title { max-width: 18ch; margin: 0; font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.03em; }

/* ---------- Mission teaser ---------- */
.mission { position: relative; display: flex; align-items: center; min-height: min(80vh, 760px); padding-block: clamp(72px, 10vw, 130px); color: var(--white); background: var(--ink); overflow: hidden; }
.mission__media, .mission__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mission__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 10, 8, 0.86) 0%, rgba(14, 10, 8, 0.6) 55%, rgba(14, 10, 8, 0.35) 100%); }
.mission__inner { position: relative; }
.mission__inner h2 { max-width: 20ch; font-size: clamp(2.1rem, 4.8vw, 4rem); line-height: 1.04; }
.mission__inner p:not(.eyebrow) { max-width: 38rem; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: rgba(255, 255, 255, 0.9); margin-bottom: 30px; }

/* ---------- Rally video ---------- */
.rally { padding-block: clamp(56px, 8vw, 104px); color: var(--white); background: var(--ink); }
.rally h2 { margin-bottom: clamp(22px, 3vw, 36px); }
.video-frame { position: relative; width: 100%; max-width: 1040px; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.video-frame iframe, .video-frame video, .video-frame .video-frame__el { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame figure { margin: 0; }
.entry-content .video-frame { margin: 8px 0 8px; }
.admin-note { padding: 18px 22px; margin: 0; font-size: 0.95rem; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.admin-note--dark { border-color: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.75); }

/* ---------- Cards ---------- */
.cards { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.cards--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cards--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: transform 0.25s, box-shadow 0.25s; }
.card:hover { color: var(--ink); transform: translateY(-5px); box-shadow: var(--shadow); }
.card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 22px 22px 24px; }
.card__meta { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.card__title { font-size: 1.28rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.card__text { color: var(--muted); font-size: 0.98rem; line-height: 1.55; }
.card__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--red); }
.card__cta .icon { width: 1.1em; height: 1.1em; transition: transform 0.2s; }
.card:hover .card__cta .icon { transform: translateX(5px); }

/* ---------- Partner logos ---------- */
.logos, .entry-content .logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; list-style: none; margin: 0; padding: 0; }
.logos li, .entry-content .logos li { display: flex; align-items: center; justify-content: center; flex: 0 1 190px; width: 190px; max-width: 100%; height: 110px; padding: 18px 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow 0.2s, transform 0.2s; }
.logos li:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.logos a, .logos span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.logos img, .entry-content .logos img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 0; }
.logos--main li, .entry-content .logos--main li { flex: 0 1 780px; width: 780px; height: auto; padding: 26px 40px; }
.logos--main a, .logos--main span { height: auto; }
.logos--main img, .entry-content .logos--main img { width: 100%; max-height: 120px; }
/* SVG logos have no fixed pixel size: fill the tile instead of using their own (sometimes huge) size */
.logos img[src$=".svg"], .entry-content .logos img[src$=".svg"] { width: 100%; height: 100%; }
/* Safety net: whatever HTML ends up inside a partners block, an image can never be larger than a tile */
.partners img, .entry-content .partners img { max-width: 100%; max-height: 170px; width: auto; height: auto; object-fit: contain; border-radius: 0; }
.partners .logos img, .entry-content .partners .logos img { max-height: 100%; }
.partners .logos--main img, .entry-content .partners .logos--main img { max-height: 120px; }
/* Partners page: each tier is a band with a heading, same tiles as the RED partners on the homepage */
.partners__tier { padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--line); }
.partners__tier:first-child { border-top: 0; padding-top: 0; }
.partners__tier h2 { text-align: center; }
.bronze-names, .entry-content .bronze-names { column-count: 2; column-gap: clamp(24px, 6vw, 80px); max-width: 760px; margin: 0 auto; padding: 0; list-style: none; text-align: left; }
.bronze-names li, .entry-content .bronze-names li { margin: 0 0 8px; break-inside: avoid; font-size: 1.05rem; font-weight: 700; color: var(--ink-2); }
.bronze-names a { color: inherit; text-decoration: none; }
.bronze-names a:hover { color: var(--red); text-decoration: underline; }
@media (max-width: 480px) { .bronze-names, .entry-content .bronze-names { column-count: 1; } }
.partners__tier h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 22px; }

/* ---------- Partner CTA + Join CTA ---------- */
.partner-cta { padding-block: clamp(40px, 6vw, 72px); color: var(--white); background: var(--red); }
.partner-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap; }
.partner-cta h2 { max-width: 22ch; margin: 0 0 10px; font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.partner-cta p { max-width: 40rem; margin: 0; color: rgba(255, 255, 255, 0.92); }

.join-cta { position: relative; color: var(--white); background: var(--ink); overflow: hidden; }
.join-cta--image { padding-block: clamp(72px, 10vw, 130px); }
.join-cta__media, .join-cta__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.join-cta--image::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(14, 10, 8, 0.88), rgba(14, 10, 8, 0.55)); }
.join-cta__inner { position: relative; z-index: 2; }
.join-cta h2 { max-width: 20ch; font-size: clamp(2rem, 4.4vw, 3.5rem); }
.join-cta p:not(.eyebrow) { max-width: 38rem; font-size: 1.12rem; color: rgba(255, 255, 255, 0.9); }
.join-cta:not(.join-cta--image) { padding: clamp(28px, 4vw, 48px); border-radius: var(--radius); }
.join-cta:not(.join-cta--image) .container { padding-inline: 0; }
.join-cta:not(.join-cta--image) h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.join-cta:not(.join-cta--image) .btn-row { margin-top: 20px; }

/* ---------- Footer ---------- */
.site-footer { color: var(--white); background: var(--red); }
.site-footer a { color: var(--white); }
.site-footer__grid { display: grid; grid-template-columns: 1fr 1.3fr 0.8fr; gap: 40px clamp(32px, 6vw, 80px); padding-block: clamp(48px, 6vw, 76px) clamp(32px, 4vw, 48px); }
.site-footer h2 { margin: 0 0 16px; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; }
.site-footer p { margin: 0 0 6px; }
.site-footer__news p { max-width: 26rem; }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-block: 22px; font-size: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.3); }
.site-footer__bottom p { margin: 0; opacity: 0.9; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.footer-menu a { text-decoration: none; opacity: 0.9; }
.footer-menu a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; max-width: 560px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field label { display: block; margin-bottom: 6px; font-size: 0.92rem; font-weight: 700; }
.field input, .field textarea { width: 100%; padding: 0.85em 1.1em; font: inherit; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); border-radius: 12px; transition: border-color 0.2s, box-shadow 0.2s; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 4px rgba(230, 48, 32, 0.15); }
.form .btn { justify-self: start; }
.form--inline { display: flex; flex-wrap: wrap; gap: 10px; max-width: 26rem; }
.form--inline .field { flex: 1 1 200px; }
.form--inline input { border-radius: 999px; border-color: transparent; }
.form--inline .btn { background: var(--ink); color: var(--white); }
.form--inline .btn:hover { background: var(--white); color: var(--ink); }
.form-message { max-width: 560px; margin: 0 0 16px; padding: 12px 16px; font-weight: 600; border-radius: 12px; }
.form-message.is-success { background: #e6f5ea; color: #14532d; }
.form-message.is-error { background: #fdecea; color: #7f1d1d; }
.site-footer .form-message { background: var(--white); max-width: 26rem; }

/* ---------- Page content ---------- */
.entry-content > *:first-child { margin-top: 0; }
.entry-content > p, .entry-content > h2, .entry-content > h3, .entry-content > h4, .entry-content > ul, .entry-content > ol,
.entry-content > .wp-block-buttons, .entry-content > blockquote, .entry-content > .wp-block-separator, .entry-content > .wp-block-image, .entry-content > .wp-block-html { max-width: 760px; }
.entry-content > p:first-of-type { font-size: 1.22rem; line-height: 1.6; }
.entry-content > h2 { margin-top: 2.2em; }
.entry-content > h3 { margin-top: 1.8em; }
.entry-content .stt-wide, .entry-content .alignwide, .entry-content .wp-block-gallery, .entry-content .wp-block-columns { max-width: none; }
.entry-content .stt-wide { margin-block: 2.2em; }
.entry-content .stt-wide:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content img { border-radius: 10px; }
.entry-content .wp-block-image { margin: 2em 0; }
.entry-content hr, .wp-block-separator { height: 1px; margin: 2.4em 0; border: 0; background: var(--line); }
.entry-back { margin-top: 3em; }
.wp-block-buttons { margin-bottom: 1.4em; }

.wp-block-gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; margin: 1.5em 0; }
.wp-block-gallery figure.wp-block-image { margin: 0 !important; width: auto !important; }
.wp-block-gallery img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 10px; cursor: zoom-in; transition: transform 0.3s, opacity 0.2s; }
.wp-block-gallery img:hover { opacity: 0.9; transform: scale(1.01); }

/* ---------- People ---------- */
.team-group + .team-group { margin-top: 64px; }
.team-group h2 { margin-bottom: 24px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 32px 24px; }
.person { position: relative; }
.person__photo { aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 14px; background: var(--soft); border-radius: var(--radius); }
.person__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.person__name { margin: 0; font-size: 1.15rem; }
.person__role { margin: 2px 0 8px; font-weight: 700; color: var(--red); }
.person__bio summary { cursor: pointer; font-size: 0.92rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.person__bio div { margin-top: 8px; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }
.person__link { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; color: var(--ink); background: var(--white); border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); transition: background-color 0.2s, color 0.2s; }
.person__link:hover { background: var(--red); color: var(--white); }
.person__link .icon { width: 18px; height: 18px; }

/* ---------- Timeline (cars, previous teams) ---------- */
.timeline { display: grid; gap: clamp(40px, 6vw, 72px); }
.timeline__item { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.timeline__item:nth-child(even) .timeline__media { order: 2; }
.timeline__media { aspect-ratio: 16 / 11; overflow: hidden; background: var(--soft); border-radius: var(--radius); }
.timeline__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.timeline__year { margin: 0; font-size: clamp(2.8rem, 6vw, 4.6rem); font-weight: 900; line-height: 1; letter-spacing: -0.04em; color: var(--red); }
.timeline__title { margin: 4px 0 14px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.story__text { color: var(--muted); }
.story__text p:last-child { margin-bottom: 0; }
.js .story:not(.is-open) .story__text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.story__toggle { margin-top: 10px; padding: 0; font: inherit; font-weight: 700; color: var(--red); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 760px) {
	.timeline__item { grid-template-columns: 1fr; }
	.timeline__item:nth-child(even) .timeline__media { order: 0; }
}

/* ---------- Positions ---------- */
.positions__group + .positions__group { margin-top: 40px; }
.positions__group h3 { margin-bottom: 16px; }
.positions__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.position { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; color: var(--ink); text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.position:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--red); }
.position__title { font-size: 1.1rem; font-weight: 800; line-height: 1.25; }
.position__text { font-size: 0.93rem; line-height: 1.5; color: var(--muted); }
.position__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--red); }
.position__cta .icon { width: 1.05em; height: 1.05em; }

/* ---------- FAQ ---------- */
.stt-faq details { border-bottom: 1px solid var(--line); }
.stt-faq details:first-child { border-top: 1px solid var(--line); }
.stt-faq summary { position: relative; padding: 18px 40px 18px 0; font-size: 1.1rem; font-weight: 700; cursor: pointer; list-style: none; }
.stt-faq summary::-webkit-details-marker { display: none; }
.stt-faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; color: var(--red); transition: transform 0.2s; }
.stt-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.stt-faq details > div { padding: 0 0 18px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-card { display: grid; gap: 10px; max-width: 560px; padding: 26px 28px; background: var(--soft); border-radius: var(--radius); }
.contact-card__row { display: flex; align-items: flex-start; gap: 14px; margin: 0; }
.contact-card__row .icon { flex: none; width: 22px; height: 22px; margin-top: 3px; color: var(--red); }
.contact-card .socials { margin-top: 8px; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.pagination .page-numbers { padding: 8px 16px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; }
.pagination .current, .pagination .page-numbers:hover { color: var(--white); background: var(--red); border-color: var(--red); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: rgba(10, 8, 7, 0.94); opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; border-radius: 6px; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; font-size: 1.6rem; line-height: 1; color: var(--white); background: rgba(255, 255, 255, 0.12); border: 0; border-radius: 50%; cursor: pointer; }
.lightbox button:hover { background: var(--red); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@keyframes stt-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.hero__content > *, .page-hero__inner > * { animation: stt-rise 0.9s ease both; }
.hero__content > :nth-child(2), .page-hero__inner > :nth-child(2) { animation-delay: 0.1s; }
.hero__content > :nth-child(3), .page-hero__inner > :nth-child(3) { animation-delay: 0.2s; }
.hero__content > :nth-child(4) { animation-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .reveal { opacity: 1; transform: none; }
}

/* ---------- Account managers (Become a partner) ---------- */
.account-managers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 300px)); gap: clamp(18px, 3vw, 32px); max-width: 760px; margin: 1.6em 0; }
.account-manager { margin: 0; }
.account-manager img, .entry-content .account-manager img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--soft); }
.account-manager h3 { margin: 14px 0 0; font-size: 1.3rem; }
.account-manager__role { margin: 0 0 8px; color: var(--muted); font-weight: 700; }
.account-manager p { margin: 0; line-height: 1.5; }

#positions, #open-positions { scroll-margin-top: calc(var(--header-h) + 24px); }

@media (max-width: 520px) {
	.logos li, .entry-content .logos li { flex: 0 1 calc(50% - 7px); width: calc(50% - 7px); height: 90px; padding: 12px 14px; }
	.logos--main li, .entry-content .logos--main li { flex-basis: 100%; width: 100%; height: auto; padding: 18px 20px; }
}

/* -------- AI Disclosure -------- */
.ai-media-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;         
  max-width: 100%;
  vertical-align: middle;
  container-type: inline-size;
}

.ai-media-wrapper > img {
  display: block;
  max-width: 100%;
  height: auto;
}

.ai-media-wrapper .ai-badge {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;

  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 9999px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

@container (max-width: 150px) {
  .ai-media-wrapper .ai-badge {
    display: none;
  }
}
.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__ai-badge {
  position: absolute;
  bottom: 1.25rem;            /* Distance from the bottom edge */
  left: 50%;
  transform: translateX(-50%); /* Centers the element horizontally */
  z-index: 2;                 /* Ensures it stays above the image/video */
  
  /* Subtle, readable badge styling */
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.85);
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 9999px;      /* Pill shape */
  white-space: nowrap;
  pointer-events: none;       /* Prevents interfering with clicks */
  user-select: none;
}
.hero__ai-badge--right {
  position: absolute;
  bottom: 1.25rem;            /* Distance from the bottom edge */
  left: auto;
  right: 1.25rem;
  transform: none;
  z-index: 2;                 /* Ensures it stays above the image/video */
  
  /* Subtle, readable badge styling */
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.85);
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 9999px;      /* Pill shape */
  white-space: nowrap;
  pointer-events: none;       /* Prevents interfering with clicks */
  user-select: none;
}