/* Header enhancements — loaded after style.css so it can refine the header.
 * Owned by the header redesign pass. Keep brand tokens (--bg/--accent/--ink).
 *
 * Goal: richer + more modern WITHOUT changing the palette or fonts.
 * Depth comes from a top-down scrim, a hairline that fades in on scroll,
 * soft elevation, and a faint brass glow at very low alpha — quiet luxury.
 */

/* ---------------------------------------------------------------------------
 * The bar: layered depth instead of a flat translucent slab.
 * A top-down scrim (darker at the top edge) gives the bar a sense of light
 * falling across it; ::after carries a faint brass glow + hairline so we can
 * fade just that layer in on scroll without animating the backdrop color.
 * ------------------------------------------------------------------------- */
/* LIGHT-ON-SCROLL HEADER (2026-06-19 — reconcile chrome with the light theme).
 * Default = solid light bar with dark ink. Correct for light-top pages
 * (About / Services / Contact / Journal / archives) at every scroll position,
 * and for the scrolled state on hero pages. Pages WITH a dark hero (home,
 * project single) get a transparent white-on-dark bar UNTIL scrolled —
 * site.js adds .rap-header--has-hero so we know to start transparent. */
.rap-header {
	background-color: #ffffff;
	background-image: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	border-block-end: 0;
	box-shadow: 0 1px 0 rgba(12, 12, 23, 0.07),
		0 14px 30px -26px rgba(12, 12, 23, 0.45);
	transition: background-color 0.45s var(--ease-lux),
		box-shadow 0.45s var(--ease-lux), color 0.45s var(--ease-lux);
}

/* Transparent over a dark hero, before scroll. A top-down dark scrim keeps the
 * white nav legible over a bright hero frame. */
.rap-header--has-hero:not(.is-scrolled) {
	background-color: transparent;
	background-image: linear-gradient(
		to bottom,
		rgba(12, 13, 15, 0.55) 0%,
		rgba(12, 13, 15, 0) 100%
	);
	box-shadow: none;
}

/* Keep the real content above any background layer. */
.rap-header__inner {
	position: relative;
	z-index: 1;
}

/* --- color states ------------------------------------------------------- */
/* LIGHT bar (default + scrolled): dark ink, deep-bronze active/hover (legible
 * on light; brand brass #9fb2cc is too pale for text on #ffffff). */
.rap-header .rap-nav__list a,
.rap-header .sda-lang-switcher__item {
	color: #0c0c17;
}
.rap-header .rap-nav__list a:hover,
.rap-header .rap-nav__list .current-menu-item > a,
.rap-header .sda-lang-switcher__item.is-active {
	color: #3b4a5e;
	opacity: 1;
}
.rap-header .rap-nav__list a::after {
	background: #3b4a5e;
}
.rap-header .rap-lang {
	border-inline-start-color: rgba(12, 12, 23, 0.16);
}
.rap-header .rap-header__toggle span {
	background: #0c0c17;
}
/* The wordmark is a white SVG — darken it to ink on the light bar. */
.rap-header .rap-header__logo--dark {
	display: block;
}
.rap-header .rap-header__logo--light {
	display: none;
}

/* OVER-HERO bar (transparent, before scroll): warm off-white + brand brass. */
.rap-header--has-hero:not(.is-scrolled) .rap-nav__list a,
.rap-header--has-hero:not(.is-scrolled) .sda-lang-switcher__item {
	color: #f4f6fa;
}
.rap-header--has-hero:not(.is-scrolled) .rap-nav__list a:hover,
.rap-header--has-hero:not(.is-scrolled) .rap-nav__list .current-menu-item > a,
.rap-header--has-hero:not(.is-scrolled) .sda-lang-switcher__item.is-active {
	color: #9fb2cc;
	opacity: 1;
}
.rap-header--has-hero:not(.is-scrolled) .rap-nav__list a::after {
	background: #9fb2cc;
}
.rap-header--has-hero:not(.is-scrolled) .rap-lang {
	border-inline-start-color: rgba(244, 246, 250, 0.18);
}
.rap-header--has-hero:not(.is-scrolled) .rap-header__toggle span {
	background: #f4f6fa;
}

/* Language switcher hover, per bar variant. The dark-zone token block in
 * style.css gives .rap-header `--accent: #ffffff`, and the switcher's own
 * `:hover { color: var(--accent) }` inherits it — white on the white bar, and
 * on the hero bar a hover that never changes anything. The nav links state a
 * colour for each variant; the switcher has to as well. */
.rap-header .rap-lang .sda-lang-switcher__item:hover {
	color: #3b4a5e;
}
.rap-header--has-hero:not(.is-scrolled) .rap-lang .sda-lang-switcher__item:hover {
	color: #9fb2cc;
}
.rap-header--has-hero:not(.is-scrolled) .rap-header__logo--dark {
	display: none;
}
.rap-header--has-hero:not(.is-scrolled) .rap-header__logo--light {
	display: block;
}

/* ---------------------------------------------------------------------------
 * Brand wordmark — single SVG lockup, refined sizing + a quiet scroll settle.
 * ------------------------------------------------------------------------- */
.rap-header__brand {
	gap: 0;
	align-self: center;
}
.rap-header__logo {
	width: auto;
	height: 64px;
	display: block;
	/* Vector logo stays sharp without raster image-rendering hints. */
	transition: opacity 0.35s var(--ease-lux);
	opacity: 1;
}
.rap-header__brand:hover .rap-header__logo {
	opacity: 1;
}
.rap-header.is-scrolled .rap-header__logo {
	transform: none;
}

/* ---------------------------------------------------------------------------
 * Nav — refined micro-interactions. The underline already grows from centre
 * (style.css); here we soften the hover with a subtle lift + tighter timing,
 * all transform/opacity so no layout animates.
 * ------------------------------------------------------------------------- */
.rap-nav__list a {
	transition: color 0.35s var(--ease-lux), opacity 0.35s var(--ease-lux),
		transform 0.35s var(--ease-lux);
}
.rap-nav__list a:hover {
	transform: none;
}
/* A touch more refinement on the editorial top rule — fade it in with the
 * scale so it arrives softly rather than snapping. */
.rap-nav__list a::after {
	height: 2px;
	inset-block-start: 0;
	opacity: 0;
	transition: transform 0.45s var(--ease-lux), opacity 0.45s var(--ease-lux);
}
.rap-nav__list a:hover::after,
.rap-nav__list .current-menu-item > a::after {
	opacity: 1;
}

/* Kill the bullet dots between menu items: Divi re-applies a list marker on the
 * <li> at a higher specificity than the base `list-style:none`, and on a flex
 * row those disc markers render as dots. Force it off at the li + ::marker. */
.rap-nav__list,
.rap-nav__list li {
	list-style: none !important;
	list-style-type: none !important;
}
.rap-nav__list li::marker {
	content: "" !important;
}

/* Roomier, more confident nav: a bit more air between items, a slightly larger
 * type size to match the bigger logo, and a calmer resting weight. */
.rap-nav__list {
	gap: clamp(22px, 2.2vw, 44px);
	justify-content: center;
	flex-wrap: nowrap;
	line-height: 1;
	height: var(--rap-header-row-h, 64px);
	align-items: center;
}
.rap-nav__list li {
	display: inline-flex;
	align-items: center;
	height: 100%;
}
.rap-nav__list a {
	font-size: 0.98rem;
	font-weight: 500;
	letter-spacing: 0.022em;
	opacity: 1;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	min-height: 0;
	padding-block: 4px;
}
.rap-header__end {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(10px, 1.1vw, 16px);
	align-self: center;
	height: var(--rap-header-rail-h, 64px);
}
.rap-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	justify-self: center;
	align-self: center;
	height: var(--rap-header-rail-h, 64px);
}
.rap-header__cta {
	margin-inline-start: 0;
	line-height: 1;
	height: 40px;
	min-height: 40px;
	padding-block: 0;
	padding-inline: 16px;
	align-self: center;
}
.rap-lang {
	margin-inline-start: 0;
	display: inline-flex;
	align-items: center;
	height: 40px;
	min-height: 40px;
	line-height: 1;
	padding-block: 0;
	padding-inline-start: 12px;
	box-sizing: border-box;
	align-self: center;
}
/* Ten menu items: a two-word label that wraps mid-bar makes the whole rail
   look broken, so every item stays on one line and the band below tightens
   the spacing instead. */
@media (min-width: 981px) {
	.rap-nav__list > li > a { white-space: nowrap; }
}
/* Ten items no longer clear the side tracks at common desktop widths, so the
   spacing starts giving ground well above the laptop band below. */
@media (max-width: 1660px) and (min-width: 1361px) {
	.rap-nav__list {
		gap: clamp(12px, 1.4vw, 22px);
	}
	.rap-nav__list a {
		font-size: 0.87rem;
	}
	.rap-header__end { gap: 14px; }
}
/* Very wide wordmark + full menu + CTA can collide around laptop widths.
   Tighten nav spacing in this band to keep alignment clean. */
@media (max-width: 1360px) and (min-width: 981px) {
	.rap-nav__list {
		gap: clamp(7px, 0.95vw, 15px);
	}
	.rap-nav__list a {
		font-size: 0.86rem;
	}
	.rap-header__cta {
		padding: 9px 13px;
		font-size: 0.69rem;
	}
	.rap-header__end { gap: 8px; }
	.rap-header__social { width: 28px; height: 28px; }
}
/* Large desktop: keep the menu in the visual center track regardless of the
 * logo width or right-side controls. */
@media (min-width: 981px) {
	:root {
		--rap-header-rail-h: 64px;
	}
	.rap-header__inner {
		display: grid;
		grid-template-columns: minmax(240px, 1fr) minmax(0, 1.4fr) minmax(240px, 1fr);
		align-items: center;
		min-height: 96px;
		column-gap: clamp(12px, 1.6vw, 28px);
	}
	.rap-header__brand {
		justify-self: start;
		height: var(--rap-header-rail-h);
		display: inline-flex;
		align-items: center;
	}
	.rap-nav {
		grid-column: 2;
		justify-self: center;
		height: var(--rap-header-rail-h);
		display: inline-flex;
		align-items: center;
	}
	.rap-nav__list {
		height: var(--rap-header-rail-h);
		align-items: center;
	}
	.rap-nav__list li {
		height: var(--rap-header-rail-h);
		display: inline-flex;
		align-items: center;
	}
	.rap-nav__list a {
		display: inline-flex;
		align-items: center;
		height: auto;
		padding-block: 4px;
	}
	.rap-header__end {
		grid-column: 3;
		justify-self: end;
		height: var(--rap-header-rail-h);
		display: inline-flex;
		align-items: center;
	}
	.rap-header__toggle {
		display: none !important;
	}
	.rap-lang .sda-lang-switcher {
		display: inline-flex;
		align-items: center;
		height: var(--rap-header-rail-h);
	}
}

/* Primary header CTA: makes consultation action visible from every page. */
.rap-header__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 16px;
	border-radius: 0;
	border: 1px solid #3b4a5e;
	color: #0c0c17;
	text-decoration: none;
	font-size: 0.74rem;
	font-weight: 500;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 0.3s var(--ease-lux), color 0.3s var(--ease-lux),
		border-color 0.3s var(--ease-lux), transform 0.3s var(--ease-lux);
}
.rap-header__cta:hover,
.rap-header__cta:focus-visible {
	background: var(--accent);
	color: var(--accent-bright);
	border-color: var(--accent);
	transform: none;
}
.rap-header--has-hero:not(.is-scrolled) .rap-header__cta {
	color: #f4f6fa;
	border-color: rgba(159, 178, 204, 0.86);
	background: rgba(12, 13, 15, 0.14);
}
.rap-header--has-hero:not(.is-scrolled) .rap-header__cta:hover,
.rap-header--has-hero:not(.is-scrolled) .rap-header__cta:focus-visible {
	background: var(--accent-bright);
	color: var(--accent);
	border-color: var(--accent-bright);
}

/* ---------------------------------------------------------------------------
 * Language switcher — refine the divider to a soft hairline that reads as
 * elevation rather than a hard rule.
 * ------------------------------------------------------------------------- */
.rap-lang {
	border-inline-start: 1px solid rgba(244, 246, 250, 0.08);
}
.rap-lang .sda-lang-switcher__item {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	opacity: 1;
	transition: color 0.3s var(--ease-lux), opacity 0.3s var(--ease-lux);
}
@media (min-width: 981px) {
	.rap-lang .sda-lang-switcher {
		display: inline-flex;
		align-items: center;
		height: 100%;
	}
}

/* ---------------------------------------------------------------------------
 * Mobile menu — give the dropped panel the same richer ground + soft elevation
 * so it feels like part of the layered header, not a flat box.
 * ------------------------------------------------------------------------- */
@media (max-width: 980px) {
	/* One bar row: brand, language switcher, toggle. The nav leaves the row and
	   becomes a drawer that hangs off the bottom of the bar. */
	:root {
		--rap-header-h: 72px;
	}
	.rap-header__inner {
		display: grid;
		grid-template-columns: 1fr auto auto;
		align-items: center;
		min-height: var(--rap-header-h);
		gap: 0;
		column-gap: clamp(12px, 3.5vw, 20px);
	}
	.rap-header__logo {
		height: 40px;
	}
	.rap-header__brand {
		grid-column: 1;
		justify-self: start;
	}
	.rap-header__end {
		grid-column: 2;
		display: inline-flex;
		align-items: center;
		height: auto;
	}
	/* Keep the trigger reachable above the fixed drawer stack. */
	.rap-header__toggle {
		grid-column: 3;
		position: relative;
		z-index: 2;
		margin-inline-start: 0;
	}
	.rap-nav {
		position: fixed;
		inset-block-start: var(--rap-header-h);
		inset-inline: 0;
		inset-block-end: 0;
		z-index: calc(var(--rap-header-z, 10001) - 1);
		display: block;
		width: auto;
		/* The desktop rail centres the nav in its row; an out-of-flow drawer has
		   to fill the band under the bar instead, or it floats mid-screen. */
		align-self: stretch;
		justify-self: stretch;
		height: auto;
		padding: 8px 20px 26px;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: rgba(17, 18, 21, 0.97);
		-webkit-backdrop-filter: blur(14px) saturate(120%);
		backdrop-filter: blur(14px) saturate(120%);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		/* Slides out of the bar rather than fading in place: the panel starts
		   pulled up under the header and unrolls downwards. */
		transform: translateY(-18px);
		will-change: opacity, transform;
		transition: opacity 0.32s var(--ease-lux), transform 0.36s var(--ease-lux),
			visibility 0.36s var(--ease-lux);
	}
	.rap-nav.is-open {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: none;
		box-shadow: 0 24px 48px -30px rgba(0, 0, 0, 0.9);
	}
	/* Items ride in behind the panel, one after the next. nth-child delays keep
	   this in CSS; the markup is a plain menu with no index attribute. */
	.rap-nav .rap-nav__list li {
		opacity: 0;
		transform: translateY(-10px);
		transition: opacity 0.34s var(--ease-lux), transform 0.34s var(--ease-lux);
	}
	.rap-nav.is-open .rap-nav__list li {
		opacity: 1;
		transform: none;
	}
	.rap-nav.is-open .rap-nav__list li:nth-child(1) { transition-delay: 90ms; }
	.rap-nav.is-open .rap-nav__list li:nth-child(2) { transition-delay: 130ms; }
	.rap-nav.is-open .rap-nav__list li:nth-child(3) { transition-delay: 170ms; }
	.rap-nav.is-open .rap-nav__list li:nth-child(4) { transition-delay: 210ms; }
	.rap-nav.is-open .rap-nav__list li:nth-child(5) { transition-delay: 250ms; }
	.rap-nav.is-open .rap-nav__list li:nth-child(6) { transition-delay: 290ms; }
	.rap-nav.is-open .rap-nav__list li:nth-child(7) { transition-delay: 330ms; }
	.rap-nav.is-open .rap-nav__list li:nth-child(n + 8) { transition-delay: 370ms; }
	/* The list is a fixed-height rail on desktop; in the drawer it is a column
	   that grows with its items. */
	.rap-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0;
		height: auto;
		overflow: visible;
	}
	/* The base rule makes each li an inline-flex chip, which left the anchor the
	   width of its own words: a 31px tap target in a 332px row. In the drawer the
	   row is a block and the anchor fills it, so anywhere on the line is a hit. */
	.rap-nav__list li {
		display: flex;
		height: auto;
		border-block-end: 1px solid rgba(244, 246, 250, 0.12);
	}
	.rap-nav__list a {
		display: flex;
		flex: 1 1 auto;
		width: 100%;
		align-items: center;
		justify-content: center;
		text-align: center;
		min-height: 56px;
		padding: 16px 12px;
		font-size: 1.18rem;
		font-weight: 500;
		line-height: 1.2;
		opacity: 0.95;
	}
	/* The drawer is a dark panel whatever the bar above it is doing, so its ink
	 * is fixed here. Both bar variants are more specific than a bare
	 * `.rap-nav__list a` — `.rap-header .rap-nav__list a` (light bar) and
	 * `.rap-header--has-hero:not(.is-scrolled) …` (over-hero) — and the light
	 * one paints #0c0c17 on a #111215 panel, i.e. 1.04:1. Matching their weight
	 * and winning on source order is what keeps the drawer legible.
	 * The `.rap-nav` in the selector is the drawer itself, not a spare class. */
	.rap-header .rap-nav .rap-nav__list a {
		color: #f4f6fa;
	}
	.rap-header .rap-nav .rap-nav__list a:hover,
	.rap-header .rap-nav .rap-nav__list .current-menu-item > a {
		color: #9fb2cc;
		opacity: 1;
	}
	/* Centred, full-width rows turn the desktop underline into a bar floating
	   across the row, a second divider. The drawer marks the current page with
	   colour and a faint wash instead. */
	.rap-nav .rap-nav__list a::after {
		content: none;
	}
	.rap-header .rap-nav .rap-nav__list .current-menu-item > a {
		background: rgba(159, 178, 204, 0.1);
	}
	/* An open drawer owns the whole screen, so the bar joins it: white bar over
	 * a black panel reads as two separate surfaces.
	 *
	 * Flat colour on purpose. `backdrop-filter` here would make the bar a
	 * containing block for its own fixed-position descendants, and .rap-nav is
	 * one of them — the drawer collapses into the 72px bar. The panel below
	 * carries the blur. */
	body.rap-nav-open .rap-header {
		background: rgba(17, 18, 21, 0.97);
	}
	body.rap-nav-open .rap-header .rap-header__toggle span {
		background: #f4f6fa;
	}
	body.rap-nav-open .rap-header .sda-lang-switcher__item {
		color: #f4f6fa;
	}
	body.rap-nav-open .rap-header .sda-lang-switcher__item.is-active {
		color: #9fb2cc;
	}
	body.rap-nav-open .rap-header .rap-lang .sda-lang-switcher__item:hover {
		color: #9fb2cc;
	}
	body.rap-nav-open .rap-header .rap-lang {
		border-inline-start-color: rgba(244, 246, 250, 0.18);
	}
	body.rap-nav-open .rap-header .rap-header__logo--dark {
		display: none;
	}
	body.rap-nav-open .rap-header .rap-header__logo--light {
		display: block;
	}
	.rap-header__cta {
		display: none;
	}
	/* The switcher ships its own `.sda-lang-switcher { display: inline-flex }`
	   in a <style> inside the body, which outranks a bare `.rap-lang` here on
	   source order — hence the header prefix. */
	.rap-header .rap-lang {
		border-inline-start: 0;
	}
	/* Divi forces `#page-container { padding-top: 0 !important }` under 980px
	   whenever a Theme Builder header is active, which slides the top of every
	   non-hero page under the fixed bar. Match its weight to restore the
	   offset; hero pages stay flush by design. */
	body:not(.rap-has-hero).et-tb-has-header #page-container,
	body:not(.rap-has-hero).et-tb #page-container {
		padding-block-start: var(--rap-header-h) !important;
	}
	body.rap-nav-open {
		overflow: hidden;
	}
	/* Hamburger lines settle on toggle with the lux ease (already set in base);
	 * nudge the rest state slightly brighter for a more confident affordance. */
	.rap-header__toggle span {
		background: var(--ink);
		opacity: 0.92;
	}
}

/* ---------------------------------------------------------------------------
 * Reduced motion — neutralise the scroll settle, hover lift, and fades.
 * The depth/glow layer still appears on scroll, just without transitions.
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.rap-header,
	.rap-header::after,
	.rap-header__logo,
	.rap-nav__list a,
	.rap-nav__list a::after,
	.rap-lang .sda-lang-switcher__item,
	.rap-nav,
	.rap-nav .rap-nav__list li,
	.rap-header__cta {
		transition: none;
	}
	/* Without the stagger the items must not stay in their pre-reveal state. */
	.rap-nav .rap-nav__list li {
		opacity: 1;
		transform: none;
	}
	.rap-nav__list a:hover {
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * Final desktop alignment lock (single control rail for logo/nav/cta/lang).
 * Keeps all header elements on one visual baseline even if earlier rules drift.
 * ------------------------------------------------------------------------- */
@media (min-width: 981px) {
	.rap-header__inner {
		display: grid !important;
		grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr) !important;
		align-items: center !important;
		min-height: 96px !important;
		column-gap: clamp(14px, 1.7vw, 28px);
	}
	.rap-header__brand {
		grid-column: 1 !important;
		justify-self: start !important;
		height: 64px !important;
		display: inline-flex !important;
		align-items: center !important;
		line-height: 0;
	}
	.rap-header .rap-nav {
		grid-column: 2 !important;
		justify-self: center !important;
		height: 64px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
	.rap-header__end {
		grid-column: 3 !important;
		justify-self: end !important;
		height: 64px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: flex-end !important;
	}

	#page-container .rap-header__inner {
		display: grid !important;
		grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr) !important;
		align-items: center !important;
		min-height: 96px !important;
		column-gap: clamp(14px, 1.7vw, 28px);
	}

	#page-container .rap-header__brand,
	#page-container .rap-header .rap-nav,
	#page-container .rap-header__end {
		height: 64px !important;
		display: inline-flex !important;
		align-items: center !important;
	}

	#page-container .rap-header__brand {
		grid-column: 1 !important;
		justify-self: start !important;
		line-height: 0;
	}
	#page-container .rap-header__logo {
		height: 60px !important;
		width: auto;
	}

	#page-container .rap-header .rap-nav {
		grid-column: 2 !important;
		justify-self: center !important;
		justify-content: center !important;
	}
	#page-container .rap-header .rap-nav__list {
		height: 64px !important;
		margin: 0;
		padding: 0;
		align-items: center !important;
	}
	#page-container .rap-header .rap-nav__list li {
		height: 64px !important;
		display: inline-flex !important;
		align-items: center !important;
	}
	#page-container .rap-header .rap-nav__list a {
		height: auto !important;
		padding-block: 4px !important;
		display: inline-flex !important;
		align-items: center !important;
		line-height: 1 !important;
	}

	#page-container .rap-header__end {
		grid-column: 3 !important;
		justify-self: end !important;
		justify-content: flex-end !important;
		gap: clamp(10px, 1.1vw, 16px) !important;
	}
	#page-container .rap-header__cta,
	#page-container .rap-header .rap-lang {
		height: 40px !important;
		min-height: 40px !important;
		display: inline-flex !important;
		align-items: center !important;
		line-height: 1 !important;
	}
	#page-container .rap-header .rap-lang .sda-lang-switcher,
	#page-container .rap-header .rap-lang .sda-lang-switcher__item {
		height: 40px;
		display: inline-flex !important;
		align-items: center !important;
		line-height: 1 !important;
	}
}

/* Laser-sharp header rendering: no softened opacity or transform blur. */
.rap-header .rap-header__logo,
.rap-header .rap-nav__list a,
.rap-header .rap-header__cta,
.rap-header .sda-lang-switcher__item {
	opacity: 1 !important;
	transform: none !important;
	-webkit-font-smoothing: auto;
	text-rendering: geometricPrecision;
}

/* ---------------------------------------------------------------------------
 * Language switcher flags — a small national flag ahead of each code, so the
 * toggle reads at a glance before the two letters do. Decorative: the code
 * itself is the accessible label, and the flags are background images so no
 * screen reader ever announces them.
 * ------------------------------------------------------------------------- */
.rap-lang .sda-lang-switcher__item {
	gap: 6px;
}
.rap-lang .sda-lang-switcher__item::before {
	content: "";
	display: inline-block;
	width: 18px;
	height: 12px;
	flex: 0 0 auto;
	border-radius: 1.5px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	box-shadow: 0 0 0 1px rgba(12, 12, 23, 0.16);
	opacity: 0.75;
	transition: opacity 0.3s var(--ease-lux);
}
.rap-lang .sda-lang-switcher__item:hover::before,
.rap-lang .sda-lang-switcher__item.is-active::before {
	opacity: 1;
}
.rap-lang .sda-lang-switcher__item[lang="he"]::before {
	background-image: url("../img/flags/il.svg");
}
.rap-lang .sda-lang-switcher__item[lang="en"]::before {
	background-image: url("../img/flags/gb.svg");
}
/* Over the hero the bar is dark, so the hairline around each flag flips light. */
.rap-header--has-hero:not(.is-scrolled) .rap-lang .sda-lang-switcher__item::before {
	box-shadow: 0 0 0 1px rgba(244, 246, 250, 0.22);
}

/* ---------------------------------------------------------------------------
 * Instagram link in the header rail.
 * ------------------------------------------------------------------------- */
.rap-header__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: inherit;
	text-decoration: none;
	transition: color 0.3s var(--ease-lux), background 0.3s var(--ease-lux);
}
.rap-header .rap-header__social { color: #0c0c17; }
.rap-header--has-hero:not(.is-scrolled) .rap-header__social { color: #f4f6fa; }
.rap-header__social:hover,
.rap-header__social:focus-visible { background: rgba(159, 178, 204, 0.16); }

/* The last 70px before the drawer takes over: the Instagram icon steps out of
   the rail rather than shoving the language switcher off the edge. It is still
   in the footer and on the contact page at every width. */
@media (max-width: 1049px) and (min-width: 981px) {
	.rap-header__social { display: none; }
	#page-container .rap-header__logo { height: 48px !important; }
}

/* The narrow half of that band: ten items, the wordmark and the switcher only
   fit once the rail, the wordmark and the type all give ground. Without this
   the whole __end column (switcher + Instagram) is pushed off the left edge. */
@media (max-width: 1280px) and (min-width: 981px) {
	.rap-header__inner { padding-inline: 24px; gap: 14px; }
	#page-container .rap-header__logo { height: 52px !important; }
	.rap-nav__list { gap: 8px; }
	.rap-nav__list a { font-size: 0.82rem; }
	.rap-lang { padding-inline-start: 8px; }
	.rap-lang .sda-lang-switcher__item::before { width: 15px; height: 10px; }
	/* The desktop rail reserves 220px on each side; below 1280 that floor is
	   what pushes the switcher off the edge, so the side tracks shrink to
	   what the wordmark and the switcher actually measure. */
	#page-container .rap-header__inner {
		grid-template-columns: minmax(150px, 1fr) auto minmax(120px, 1fr) !important;
		column-gap: 14px;
	}
}
