/**
 * Shared site chrome and generic WordPress templates.
 */

/* One design unit = 1% of the 1512px Figma frame width. The page scales
   fluidly with the viewport width up to 1920px, and is additionally capped by
   viewport height so a full design screen (hero = 65.2 units) stays in view:
   at 1.52vh per unit the hero occupies ~99vh. On tall viewports the width
   term governs and the rendering matches the plain-width system exactly. */
:root {
	/* Horizontal design unit: fluid with viewport width, capped at the 1920px
	   rendering of the 1512px frame. */
	--cohen-u: min(1vw, 19.2px);
	/* Vertical design unit: follows the horizontal unit on tall viewports
	   (exact design proportions) but is capped by viewport height so a full
	   design screen (hero = 65.2 units) stays in view at any width. */
	--cohen-uv: min(var(--cohen-u), 1.53vh);
}

.site-template-part--header,
	.cohen-site-header {
		margin: 0;
	}

	.cohen-site-footer {
		margin-block: 0 !important;
	}

	.site-header {
		background: transparent;
		inset-block-start: 0;
		inset-inline: 0;
		margin: 0;
		pointer-events: none;
		position: fixed;
		z-index: 20;
	}

	.site-header__inner {
		backdrop-filter: blur(3.4px);
		background: rgb(255 255 255 / 0.45);
		border: 0;
		border-radius: 2.625rem;
		block-size: 3.75rem;
		inline-size: min(100% - 10.648 * var(--cohen-u), 113.4259 * var(--cohen-u));
		margin-block-start: calc(3.108 * var(--cohen-uv));
		margin-inline: auto;
		max-inline-size: none;
		padding-inline: calc(1.587 * var(--cohen-u));
		pointer-events: auto;
		position: relative;
	}

	/* Figma 186:1954: the header shows the same crop of the primary logo as
	   the quote card - the navy wordmark row only (crop transform from the
	   node: 138.89% x 171.06% at -16.67%, -0.53%). */
	.site-header__logo {
		/* uv on both axes: the crop box must scale uniformly or the logo
		   stretches on height-capped viewports. */
		block-size: calc(3.175 * var(--cohen-uv));
		flex: 0 0 auto;
		inline-size: calc(7.606 * var(--cohen-uv));
		margin: 0;
		overflow: hidden;
		position: relative;
	}

	.site-header__logo a {
		display: block;
		block-size: 100%;
	}

	.site-header__logo img {
		block-size: 171.06%;
		inline-size: 138.89%;
		inset-block-start: -0.53%;
		left: -16.67%;
		max-block-size: none;
		max-inline-size: none;
		position: absolute;
	}

	.site-header__navigation {
		color: var(--wp--preset--color--navy);
		font-size: 0.875rem;
		font-weight: 600;
		inline-size: max-content;
		left: 50%;
		position: absolute;
		transform: translateX(-50%);
		white-space: nowrap;
	}

	.site-header__navigation .wp-block-navigation__container {
		flex-direction: row;
		flex-wrap: nowrap;
		gap: calc(1.653 * var(--cohen-u));
	}

	.site-header__navigation a {
		color: inherit;
		text-decoration: none;
	}

	.site-header__navigation .current-menu-item > a,
	.site-header__navigation .current_page_item > a,
	.site-header__navigation .wp-block-navigation-submenu:has(a[aria-current="page"]) > .wp-block-navigation-item__content,
	.site-header__navigation a[aria-current="page"],
	.site-header__navigation a[aria-current="true"] {
		text-decoration: underline;
		text-decoration-color: var(--wp--preset--color--red);
		text-decoration-thickness: 0.125rem;
		text-underline-offset: 0.7rem;
	}

	.site-header__navigation .wp-block-navigation-submenu__toggle {
		font-weight: inherit;
	}

	.site-main:not(.cohen-service-main) {
		min-block-size: 60vh;
		padding-block: 10rem var(--cohen-section-space);
	}

	.site-main--page > .page-header__title,
	.site-main--archive > .archive-header__title,
	.site-main--single > .entry {
		margin-block-start: 0;
	}

	.entry__meta {
		color: var(--wp--preset--color--ink-muted);
		font-size: var(--wp--preset--font-size--small);
	}

	.entry__featured-image img,
	.archive-card__image img {
		border-radius: var(--cohen-card-radius);
		object-fit: cover;
	}

	.site-archive__query .wp-block-post-template {
		gap: clamp(1.25rem, 3vw, 2.25rem);
	}

	.archive-card {
		background: var(--wp--preset--color--white);
		border-radius: var(--cohen-card-radius);
		box-shadow: var(--wp--preset--shadow--card);
		overflow: hidden;
		padding-block-end: 1.5rem;
	}

	.archive-card > :not(.archive-card__image) {
		margin-inline: 1.5rem;
	}

	/* Footer per Figma 186:1902: the navy shape is the exported dome+swoosh
	   composite (186:1905) fitted to frame box (−488,8053)–(2028,9678) — it
	   overflows above the 597px footer band by design, with the periwinkle
	   glow along its edge. All content sits at exact frame offsets
	   (footer-local = frame_y − 8425) as fractions of the 1512×597 band. */
	.site-footer {
		background: transparent;
		block-size: calc(39.4841 * var(--cohen-uv));
		margin-block-start: 0;
		overflow: visible;
		padding: 0;
		position: relative;
	}

	.site-footer::before {
		background: url("../images/footer-curve.svg") 0 0 / 100% 100% no-repeat;
		block-size: 272.1926%;
		content: "";
		filter: drop-shadow(0 0 32px rgb(163 177 238 / 0.85));
		inline-size: 166.4083%;
		inset-block-start: -60.4857%;
		left: -32.2751%;
		pointer-events: none;
		position: absolute;
		z-index: 0;
	}

	/* Solid navy underlay for the lower band — the dome's far edge exits the
	   frame before the page bottom. */
	.site-footer::after {
		background: var(--wp--preset--color--navy);
		content: "";
		inset: 45% 0 0 0;
		pointer-events: none;
		position: absolute;
		z-index: 0;
	}

	.site-footer > * {
		margin: 0 !important;
		position: absolute;
		z-index: 1;
	}

	/* Divider 186:1908: 1312×2 at (84, 8588). */
	.site-footer__separator {
		background: rgb(255 255 255 / 0.75) !important;
		block-size: 2px;
		border: 0 !important;
		inline-size: 86.7725% !important;
		inset-block-start: 27.3032%;
		left: 5.5556%;
		max-inline-size: none !important;
		opacity: 1;
	}

	/* Social icons 186:1909: 178×30 at (91, 8627). */
	.site-footer__social {
		direction: ltr;
		display: flex;
		gap: calc(1.2566 * var(--cohen-u));
		inset-block-start: 33.8358%;
		left: 6.0185%;
	}

	.site-footer__social .wp-social-link {
		background: transparent !important;
		border: 1.5px solid rgb(255 255 255 / 0.95);
		border-radius: 50%;
		block-size: calc(1.9841 * var(--cohen-u));
		color: #fff !important;
		inline-size: calc(1.9841 * var(--cohen-u));
		margin: 0;
		padding: 0;
	}

	.site-footer__social .wp-social-link a {
		align-items: center;
		block-size: 100%;
		color: #fff !important;
		display: flex;
		inline-size: 100%;
		justify-content: center;
		padding: 0;
	}

	.site-footer__social .wp-social-link svg {
		block-size: calc(1.0582 * var(--cohen-u));
		fill: #fff !important;
		inline-size: calc(1.0582 * var(--cohen-u));
	}

	/* Contact column 186:1916: right edge 1111, rows from 8627. */
	.site-footer__contact {
		inset-block-start: 33.8358%;
		right: 26.5212%;
		text-align: right;
	}

	.site-footer__contact p {
		font-size: calc(0.8598 * var(--cohen-uv));
		line-height: calc(1.1243 * var(--cohen-uv));
		margin: 0;
	}

	.site-footer__contact p:nth-child(2) { margin-block-start: calc(0.9921 * var(--cohen-u)); }
	.site-footer__contact p:nth-child(3) { margin-block-start: calc(0.9921 * var(--cohen-u)); }
	.site-footer__contact p:nth-child(4) { margin-block-start: calc(1.2566 * var(--cohen-u)); }
	.site-footer__contact p:nth-child(5) { margin-block-start: calc(0.9921 * var(--cohen-u)); }
	.site-footer__contact p:nth-child(6) { margin-block-start: calc(0.6614 * var(--cohen-u)); }

	.site-footer__heading {
		color: #fff;
		font-weight: 800;
	}

	.site-footer__licenses {
		line-height: calc(1.9841 * var(--cohen-uv)) !important;
	}

	/* Link columns 186:1921/186:1927: right edges 868 and 643, 36px rhythm. */
	.site-footer__col--one {
		inset-block-start: 33.8358%;
		right: 42.5926%;
	}

	.site-footer__col--two {
		inset-block-start: 34.5059%;
		right: 57.4735%;
	}

	/* rtl: flex-start is the RIGHT edge - the design right-aligns each
	   column's links (frame right rails 868 / 643). */
	.site-footer__col .wp-block-navigation__container {
		align-items: flex-start;
		flex-direction: column;
		gap: calc(1.2566 * var(--cohen-uv));
	}

	.site-footer__col .wp-block-navigation-item__content {
		font-size: calc(0.8598 * var(--cohen-uv));
		line-height: calc(1.1243 * var(--cohen-uv));
	}

	.site-footer p,
	.site-footer a {
		color: var(--wp--preset--color--periwinkle);
		text-decoration: none;
	}

	.site-footer a:hover,
	.site-footer a:focus-visible {
		text-decoration: underline;
	}

	/* Logo lockup 186:1934: 195×100 at (1229, 8627) — white raster plus the
	   red swoosh (1237.6, 8676) and red square (1346.6, 8644.5). */
	.site-footer__brand {
		/* Fixed-aspect box (195×100.08 design px, vertical units both axes) so
		   the logo, swoosh, and dot scale as one rigid lockup on any viewport;
		   the footer around it may flatten, the lockup may not. */
		block-size: calc(6.6191 * var(--cohen-uv));
		display: block;
		inline-size: calc(12.897 * var(--cohen-uv));
		inset-block-start: 33.8358%;
		right: 5.8188%;
	}

	.site-footer__brand-logo {
		block-size: 100%;
		display: block;
		inline-size: 100%;
		object-fit: contain;
	}

	.site-footer__brand-swoosh {
		block-size: 24.75%;
		inline-size: 87.76%;
		inset-block-start: 52.48%;
		left: 4.59%;
		position: absolute;
	}

		/* Covers the white square baked into the logo raster (blob at 60.28%,
	   17.47%, 8.08% x 15.41%) exactly, with a sliver of bleed so the PNG's
	   antialiased edges never peek out as a white rim. */
	.site-footer__brand-dot {
		background: #c00;
		block-size: 16.21%;
		inline-size: 8.49%;
		inset-block-start: 17.07%;
		left: 60.08%;
		position: absolute;
	}

	.site-footer__legal,
	.site-footer__licenses-mobile {
		display: none;
	}

@media (min-width: 48rem) {
	.site-header {
		inset-block-start: calc(3.108 * var(--cohen-uv));
	}

	.site-header__inner {
		margin-block-start: 0;
	}

	.cohen-site-header {
		block-size: 0;
		position: relative;
		z-index: 20;
	}

	.site-header__navigation > .wp-block-navigation__responsive-container {
		overflow: visible;
	}

	/* The submenu continues the header's floating glass pill: same translucent
	   white + blur, the pill's radius family, navy text and red accents. */
	.site-header__navigation .wp-block-navigation__submenu-container {
		backdrop-filter: blur(3.4px);
		background: rgb(255 255 255 / 0.85) !important;
		border: 0 !important;
		border-radius: 1.3125rem;
		box-shadow: 0 0.75rem 2.25rem rgb(0 22 115 / 0.18);
		gap: 0 !important;
		inset-block-start: calc(100% + 0.75rem) !important;
		min-inline-size: 12.5rem !important;
		padding: 0.625rem 0.5625rem;
	}

	.site-header__navigation .wp-block-navigation__submenu-container::before {
		block-size: 0.75rem;
		content: "";
		inset-block-end: 100%;
		inset-inline: 0;
		position: absolute;
	}

	/* Core makes submenu <li>s inherit the panel background, stacking the glass
	   twice where the items sit — keep the material on the panel only. */
	.site-header__navigation .wp-block-navigation__submenu-container > li {
		background: transparent !important;
	}

	.site-header__navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		border-radius: 999px;
		color: var(--wp--preset--color--navy) !important;
		padding-block: 0.5rem !important;
		padding-inline: 1rem !important;
		white-space: nowrap;
	}

	.site-header__navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
	.site-header__navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
		background: rgb(255 255 255 / 0.97);
		color: var(--wp--preset--color--navy);
		outline: none;
		text-decoration: underline;
		text-decoration-color: var(--wp--preset--color--red);
		text-decoration-thickness: 0.125rem;
		text-underline-offset: 0.35rem;
	}
}

@media (max-width: 47.999rem) {
	.site-template-part--header,
	.cohen-site-header {
		block-size: 4.375rem;
		position: relative;
		z-index: 20;
	}

	.site-header {
		background: var(--wp--preset--color--white);
		pointer-events: auto;
		position: fixed;
	}

	.site-header__inner {
		backdrop-filter: none;
		background: var(--wp--preset--color--white);
		border: 0;
		border-radius: 0;
		box-shadow: none;
		block-size: 4.375rem;
		inline-size: 100%;
		margin: 0;
		padding-inline: 1.25rem;
	}

	/* Figma 262:8: logo 100×42 at the right, 14px from the top. */
	.site-header__logo {
		block-size: 2.625rem;
		inline-size: 6.25rem;
	}

	/* Figma 262:4: three 24×2.5 bars at x20; the core block's icon has only
	   two lines, so draw the design's own. */
	.site-header__navigation .wp-block-navigation__responsive-container-open {
		color: var(--wp--preset--color--navy);
		left: 20px;
		padding: 8px 0;
		position: absolute;
	}

	.site-header__navigation .wp-block-navigation__responsive-container-open svg {
		display: none;
	}

	.site-header__navigation .wp-block-navigation__responsive-container-open::before {
		background: var(--wp--preset--color--navy);
		border-radius: 2px;
		block-size: 2.5px;
		box-shadow: 0 6.5px 0 var(--wp--preset--color--navy), 0 13px 0 var(--wp--preset--color--navy);
		content: "";
		display: block;
		inline-size: 24px;
		margin-block-end: 13px;
	}

	.site-header__navigation {
		inline-size: auto;
		left: auto;
		position: static;
		transform: none;
		white-space: normal;
	}

	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open {
		background: var(--wp--preset--color--white);
		color: var(--wp--preset--color--navy);
		padding: 1.25rem;
	}

	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		align-items: stretch;
		flex-direction: column;
		gap: 0.75rem;
	}

	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
		border-inline-start: 0.125rem solid var(--wp--preset--color--periwinkle);
		gap: 0.75rem;
		margin-block-start: 0.75rem;
		padding-block: 0.25rem !important;
		padding-inline: 1rem !important;
	}

	.site-main:not(.cohen-service-main) {
		padding-block: 3rem var(--cohen-section-space);
	}

	.site-archive__query .wp-block-post-template {
		grid-template-columns: 1fr;
	}

	/* Mobile footer per Figma 270:2: flat navy; logo 140×72 top-right (y36);
	   contact rows; two titled link columns; divider then licences. */
	.site-footer {
		background: var(--wp--preset--color--navy);
		block-size: auto;
		display: grid;
		gap: 0 1rem;
		grid-template-areas:
			"brand brand"
			"contact contact"
			"coltwo colone"
			"sep sep"
			"lic lic";
		grid-template-columns: 1fr 1fr;
		overflow: hidden;
		padding: 2.25rem 1.375rem 1.75rem;
	}

	.site-footer::before,
	.site-footer::after,
	.site-footer__social {
		display: none !important;
	}

	.site-footer > * {
		inset: auto;
		position: relative;
	}

	.site-footer__brand {
		block-size: 4.5rem;
		display: block;
		grid-area: brand;
		inline-size: 8.75rem;
		justify-self: start;
		margin-block-end: 1.375rem !important;
		/* The raster contains transparent padding on its right. Shift the box
		   by that padding so the visible logo ink shares the contact text rail. */
		right: -1.5rem;
	}

	/* The mobile frame (270:3) shows the plain white raster - no swoosh or
	   dot overlays. */
	.site-footer__brand-swoosh,
	.site-footer__brand-dot {
		display: none;
	}

	.site-footer__contact {
		grid-area: contact;
		margin-block-end: 1.375rem !important;
		text-align: start;
	}

	.site-footer__contact p {
		font-size: 0.875rem;
		line-height: 1.6;
		margin: 0 !important;
	}

	.site-footer__contact .site-footer__heading {
		font-size: 0.9375rem;
	}

	.site-footer__col--one {
		grid-area: colone;
	}

	.site-footer__col--two {
		grid-area: coltwo;
	}

	.site-footer__col--one::before,
	.site-footer__col--two::before {
		color: #fff;
		display: block;
		font-size: 0.875rem;
		font-weight: 800;
		margin-block-end: 0.625rem;
	}

	.site-footer__col--one::before {
		content: "החברה";
	}

	.site-footer__col--two::before {
		content: "הביטוחים";
	}

	.site-footer__col .wp-block-navigation__container {
		align-items: flex-start;
		gap: 0.5625rem;
	}

	.site-footer__col .wp-block-navigation-item__content {
		font-size: 0.8125rem;
		line-height: 1.45;
	}

	.site-footer__separator {
		background: rgb(255 255 255 / 0.35) !important;
		block-size: 1px;
		grid-area: sep;
		inline-size: 100% !important;
		margin-block: 1.375rem 1.25rem !important;
	}

	/* Figma mobile keeps the licences on a single bottom row under the
	   divider; the contact block's inline licence rows are desktop-only. */
	.site-footer__contact p:nth-child(5),
	.site-footer__contact .site-footer__licenses {
		display: none;
	}

	.site-footer__licenses-mobile {
		display: block;
		font-size: 0.8125rem;
		grid-area: lic;
		line-height: 1.5;
		margin: 0 !important;
	}
}


/* Motion: fast hover feedback everywhere; one-shot section entrances and the
   header drop-in only for users without a reduced-motion preference. The
   entrance end-state is transform: none, so settled layout is identical to
   the static rendering. */
.wp-block-button__link,
.cohen-home-form-preview button,
.cohen-motion-button,
.site-footer a {
	transition: background-color 0.2s ease, color 0.2s ease,
		border-color 0.2s ease, opacity 0.2s ease;
}

.site-footer a:hover {
	color: var(--wp--preset--color--periwinkle);
}

.cohen-home-partners__strip img {
	transition: transform 0.3s ease, filter 0.3s ease;
}

.cohen-home-partners__strip figure:hover img {
	filter: brightness(1.06);
	transform: scale(1.05);
}

.wp-block-button__link,
.cohen-home-form-preview button,
.cohen-motion-button {
	transition: background-color 0.2s ease, color 0.2s ease,
		border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.wp-block-button__link:hover,
.cohen-home-form-preview button:hover,
.cohen-motion-button:hover {
	box-shadow: 0 10px 22px rgb(0 22 115 / 0.18);
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: no-preference) {
	/* No fill retention: a retained transform would make the pill the
	   containing block for the phone menu's position: fixed overlay. */
	.site-header__inner {
		animation: cohen-header-drop 0.7s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.cohen-reveal {
		opacity: 0;
		transform: translateY(38px);
		transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
			transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.cohen-reveal.is-revealed {
		opacity: 1;
		transform: none;
	}

	/* The footer divider draws outward instead of travelling vertically -
	   a translating line visibly crosses the licences text on phones. */
	.site-footer__separator.cohen-reveal-item {
		transform: scaleX(0);
	}

	.site-footer__separator.cohen-reveal-item.is-revealed {
		transform: scaleX(1);
	}

	.cohen-reveal-item {
		opacity: 0;
		transform: translateY(30px);
		transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
			transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.cohen-reveal-item.is-revealed {
		opacity: 1;
		transform: none;
	}

	/* Hero interior: photo first, then headline, intro, buttons. */
	.cohen-home-hero.cohen-reveal .cohen-home-hero__title,
	.cohen-home-hero.cohen-reveal .cohen-home-hero__intro,
	.cohen-home-hero.cohen-reveal .cohen-home-hero__actions,
	.cohen-motion-hero.cohen-reveal .cohen-motion-hero__title,
	.cohen-motion-hero.cohen-reveal .cohen-motion-hero__copy,
	.cohen-motion-hero.cohen-reveal .cohen-motion-hero__actions {
		opacity: 0;
		transform: translateY(28px);
		transition: opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1),
			transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.cohen-home-hero.cohen-reveal.is-revealed .cohen-home-hero__title {
		opacity: 1;
		transform: none;
		transition-delay: 0.35s;
	}

	.cohen-motion-hero.cohen-reveal.is-revealed .cohen-motion-hero__title {
		opacity: 1;
		transform: none;
		transition-delay: 0.35s;
	}

	.cohen-home-hero.cohen-reveal.is-revealed .cohen-home-hero__intro {
		opacity: 1;
		transform: none;
		transition-delay: 0.75s;
	}

	.cohen-motion-hero.cohen-reveal.is-revealed .cohen-motion-hero__copy {
		opacity: 1;
		transform: none;
		transition-delay: 0.75s;
	}

	.cohen-home-hero.cohen-reveal.is-revealed .cohen-home-hero__actions {
		opacity: 1;
		transform: none;
		transition-delay: 1.1s;
	}

	.cohen-motion-hero.cohen-reveal.is-revealed .cohen-motion-hero__actions {
		opacity: 1;
		transform: none;
		transition-delay: 1.1s;
	}

	/* Page-family workers apply this class to a wrapper around a decorative
	   right-anchored swoosh. Keeping the transform on a wrapper avoids
	   overwriting any node-local rotation on the exported artwork itself. */
	.cohen-reveal .cohen-motion-swoosh {
		transform: scaleX(0);
		transform-origin: var(--cohen-swoosh-origin, 100% 50%);
		transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.55s;
	}

	.cohen-reveal.is-revealed .cohen-motion-swoosh {
		transform: scaleX(1);
	}

	.cohen-reveal .cohen-motion-mark {
		opacity: 0;
	}

	.cohen-reveal.is-revealed .cohen-motion-mark {
		animation: cohen-mark-stamp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
	}

	/* The red metric swooshes draw in after their number lands. */
	.cohen-home-metric.cohen-reveal-item::after {
		transform: scaleX(0);
		transform-origin: 70% 50%;
		transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.55s;
	}

	.cohen-home-metric.cohen-reveal-item.is-revealed::after {
		transform: scaleX(1);
	}

	/* The floating gershayim stamp in with a small overshoot once their band
	   arrives; the keyframes end exactly on the static rotation. */
	.cohen-reveal .cohen-home-quote__anchor::before {
		opacity: 0;
	}

	.cohen-reveal.is-revealed .cohen-home-quote__anchor--open::before {
		--mark-rot: 12.54deg;
		animation: cohen-mark-stamp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
	}

	.cohen-reveal.is-revealed .cohen-home-quote__anchor--close::before {
		--mark-rot: 6.8deg;
		animation: cohen-mark-stamp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s both;
	}
}

@keyframes cohen-mark-stamp {
	from {
		opacity: 0;
		transform: rotate(var(--mark-rot, 0deg)) scale(0.3);
	}

	to {
		opacity: 1;
		transform: rotate(var(--mark-rot, 0deg)) scale(1);
	}
}

/* Phones animate opacity only - a transform, even mid-animation, would trap
   the fixed fullscreen menu inside the header pill. */
@media (prefers-reduced-motion: no-preference) and (max-width: 47.999rem) {
	.site-header__inner {
		animation-name: cohen-header-fade;
	}
}

@keyframes cohen-header-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes cohen-header-drop {
	from {
		opacity: 0;
		transform: translateY(-16px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}


/* WP core's skip link ships its hiding CSS late in the document, so it
   flashes top-left on every load; hide it from head-loaded CSS instead,
   keeping the standard keyboard-focus reveal. */
.skip-link.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	block-size: 1px;
	inline-size: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal;
}

.skip-link.screen-reader-text:focus {
	background: #fff;
	block-size: auto;
	clip-path: none;
	color: var(--wp--preset--color--navy);
	inline-size: auto;
	inset-block-start: 8px;
	inset-inline-start: 8px;
	padding: 0.75rem 1.25rem;
	z-index: 100;
}

/* Footer contact rows are white in every frame; links inherited the theme
   link colour. The phone number is an LTR run inside RTL copy - isolate it
   so it reads 04 - 0000000, not reversed. */
.site-footer__contact a {
	color: #fff;
	text-decoration: none;
}

.site-footer__contact a[href^="tel:"] {
	direction: ltr;
	display: inline-block;
	unicode-bidi: isolate;
}

/* Service frames continue the page wash behind the footer dome corners
   (Home fades its last ellipse out instead, so it keeps a white backdrop). */
/* Footer backgrounds continue each page's own atmosphere art with exact
   u/uv coordinates, so the boundary is seamless at every viewport.
   The y constant is (pageHeight_uv - 39.4841); resample if a page's
   height changes. */
@media (min-width: 48rem) {
	body:has(.cohen-car-page) .site-footer {
		background:
			url("../images/car-fidelity-atmosphere-lower-right.svg") calc(2.381 * var(--cohen-u)) calc(-153.539 * var(--cohen-uv)) / calc(192.857 * var(--cohen-u)) calc(206.349 * var(--cohen-uv)) no-repeat,
			url("../images/car-fidelity-atmosphere-lower-left.svg") calc(-91.336 * var(--cohen-u)) calc(-75.761 * var(--cohen-uv)) / calc(213.294 * var(--cohen-u)) calc(204.696 * var(--cohen-uv)) no-repeat,
			#fff;
	}

	body:has(.cohen-business-page) .site-footer {
		background:
			url("../images/car-fidelity-atmosphere-lower-right.svg") calc(2.381 * var(--cohen-u)) calc(-151.839 * var(--cohen-uv)) / calc(192.857 * var(--cohen-u)) calc(206.349 * var(--cohen-uv)) no-repeat,
			url("../images/car-fidelity-atmosphere-lower-left.svg") calc(-91.336 * var(--cohen-u)) calc(-74.061 * var(--cohen-uv)) / calc(213.294 * var(--cohen-u)) calc(204.696 * var(--cohen-uv)) no-repeat,
			#fff;
	}

	body:has(.cohen-critical-page) .site-footer {
		background:
			url("../images/car-fidelity-atmosphere-lower-right.svg") calc(2.381 * var(--cohen-u)) calc(-151.839 * var(--cohen-uv)) / calc(192.857 * var(--cohen-u)) calc(206.349 * var(--cohen-uv)) no-repeat,
			url("../images/car-fidelity-atmosphere-lower-left.svg") calc(-91.336 * var(--cohen-u)) calc(-74.061 * var(--cohen-uv)) / calc(213.294 * var(--cohen-u)) calc(204.696 * var(--cohen-uv)) no-repeat,
			#fff;
	}

	body:has(.cohen-accident-page) .site-footer {
		background:
			url("../images/car-fidelity-atmosphere-lower-right.svg") calc(2.381 * var(--cohen-u)) calc(-151.839 * var(--cohen-uv)) / calc(192.857 * var(--cohen-u)) calc(206.349 * var(--cohen-uv)) no-repeat,
			url("../images/car-fidelity-atmosphere-lower-left.svg") calc(-91.336 * var(--cohen-u)) calc(-74.061 * var(--cohen-uv)) / calc(213.294 * var(--cohen-u)) calc(204.696 * var(--cohen-uv)) no-repeat,
			#fff;
	}

	body:has(.cohen-service-b-shell--travel) .site-footer {
		background:
			url("../images/car-fidelity-atmosphere-lower-right.svg") calc(2.381 * var(--cohen-u)) calc(-118.939 * var(--cohen-uv)) / calc(192.857 * var(--cohen-u)) calc(206.349 * var(--cohen-uv)) no-repeat,
			url("../images/car-fidelity-atmosphere-lower-left.svg") calc(-91.336 * var(--cohen-u)) calc(-41.161 * var(--cohen-uv)) / calc(213.294 * var(--cohen-u)) calc(204.696 * var(--cohen-uv)) no-repeat,
			#fff;
	}

	body:has(.cohen-service-b-shell--life) .site-footer {
		background:
			url("../images/car-fidelity-atmosphere-lower-right.svg") calc(2.381 * var(--cohen-u)) calc(-134.559 * var(--cohen-uv)) / calc(192.857 * var(--cohen-u)) calc(206.349 * var(--cohen-uv)) no-repeat,
			url("../images/car-fidelity-atmosphere-lower-left.svg") calc(-91.336 * var(--cohen-u)) calc(-56.781 * var(--cohen-uv)) / calc(213.294 * var(--cohen-u)) calc(204.696 * var(--cohen-uv)) no-repeat,
			#fff;
	}

	body:has(.cohen-service-b-shell--home) .site-footer {
		background:
			url("../images/car-fidelity-atmosphere-lower-right.svg") calc(2.381 * var(--cohen-u)) calc(-122.139 * var(--cohen-uv)) / calc(192.857 * var(--cohen-u)) calc(206.349 * var(--cohen-uv)) no-repeat,
			url("../images/car-fidelity-atmosphere-lower-left.svg") calc(-91.336 * var(--cohen-u)) calc(-44.361 * var(--cohen-uv)) / calc(213.294 * var(--cohen-u)) calc(204.696 * var(--cohen-uv)) no-repeat,
			#fff;
	}

	body:has(.cohen-service-b-shell--pension) .site-footer {
		background:
			url("../images/car-fidelity-atmosphere-lower-right.svg") calc(2.381 * var(--cohen-u)) calc(-152.839 * var(--cohen-uv)) / calc(192.857 * var(--cohen-u)) calc(206.349 * var(--cohen-uv)) no-repeat,
			url("../images/car-fidelity-atmosphere-lower-left.svg") calc(-91.336 * var(--cohen-u)) calc(-75.061 * var(--cohen-uv)) / calc(213.294 * var(--cohen-u)) calc(204.696 * var(--cohen-uv)) no-repeat,
			#fff;
	}

	/* Team's lower Figma ellipse begins at page y=2157 and extends beyond
	   the 4121px content canvas. Continue the same asset in footer-local
	   coordinates so the transparent dome corners do not expose a white cut. */
	body:has(.cohen-team-page) .site-footer {
		background:
			url("../images/team-fidelity-atmosphere-lower-r3.svg") calc(-91.493 * var(--cohen-u)) calc(-129.8939 * var(--cohen-uv)) / calc(213.294 * var(--cohen-u)) calc(204.696 * var(--cohen-uv)) no-repeat,
			#fff;
	}

	/* Both lower Articles ellipses cross the 3277px content/footer boundary.
	   Rebase their original page coordinates into the footer so their radial
	   washes remain continuous beneath the dome's transparent corners. */
	body:has(.cohen-articles-main) .site-footer {
		background:
			url("../images/articles-fidelity-r3-atmosphere-b.svg") calc(2.381 * var(--cohen-u)) calc(-141.9974 * var(--cohen-uv)) / calc(192.8571 * var(--cohen-u)) calc(206.3492 * var(--cohen-uv)) no-repeat,
			url("../images/articles-fidelity-r3-atmosphere-c.svg") calc(-91.0053 * var(--cohen-u)) calc(-74.0741 * var(--cohen-uv)) / calc(213.2937 * var(--cohen-u)) calc(204.6958 * var(--cohen-uv)) no-repeat,
			#fff;
	}
}

/* Keep the fixed chrome below WordPress' own toolbar while editing. */
body.admin-bar .site-header {
	inset-block-start: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .site-header {
		inset-block-start: 46px;
	}
}
