/*
 * UNEC – Split Panels  v1.0.0
 * Figma 184:15360 ("Tabs") — file Q5ckGwby9XewAE51OXln5p
 *
 * The frame draws the two panels in DIFFERENT STATES, not two different
 * designs — the left one is at rest, the right one is hovered, and the
 * designer drew a mouse cursor on it to say so. Both panels therefore rest
 * as a bare photograph with white type, and both take the brand tint with
 * dark type on hover, keyboard focus and touch press.
 *
 * Every selector is scoped under #top. The only !important declarations are
 * the four of the container release.
 */

/* ------------------------------------------------------------------ *
 * 1. Tokens
 * ------------------------------------------------------------------ */

#top .unec_sp_sec {
	/* Palette */
	--unec_sp_ink: #231f20;
	--unec_sp_brand: #ffc20e;
	--unec_sp_on_dark: #ffffff;

	/* Type */
	--unec_sp_font: 'Pretendard', 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--unec_sp_title_fs: 92px;
	--unec_sp_title_lh: 88px;
	--unec_sp_title_ls: -0.04em;

	/* Pretendard typo metrics, verified with fontTools against the shipped
	 * Regular / Medium / SemiBold faces. 2048 / 1949 / 494 / cap 1448,
	 * USE_TYPO_METRICS set. */
	--unec_sp_em_h: 1.19287109375;      /* (1949 + 494) / 2048 */
	--unec_sp_asc_cap: 0.24462890625;   /* (1949 - 1448) / 2048 */
	--unec_sp_desc: 0.2412109375;       /* 494 / 2048 */

	/* Layout — the band is the panels; it has no padding of its own. */
	--unec_sp_h: 800px;
	--unec_sp_gap: 0px;
	--unec_sp_pad_x: 160px;             /* 864 half - 2 x 160 = the 544 measure */
	--unec_sp_measure: 544px;

	/*
	 * Rest and hover are one pair of tokens each. The base rules READ them
	 * and never SET them, so the state selectors re-point them without
	 * out-specifying anything — claude/contact-pages.md trap 3.
	 */
	--unec_sp_tint: var(--unec_sp_brand);
	--unec_sp_tint_a: 0;                /* rest: no tint at all           */
	--unec_sp_tint_hover_a: 0.92;       /* hover: the design's 92%        */
	--unec_sp_title_ink: var(--unec_sp_on_dark);

	/*
	 * A separate, always-on wash for legibility. Figma applies none — the
	 * left panel is a bare photograph — so this ships at 0. It is here
	 * because "white type on whatever photograph was uploaded" is one light
	 * image away from unreadable, and this is a field rather than a rebuild.
	 */
	--unec_sp_scrim: #000000;
	--unec_sp_scrim_a: 0;

	--unec_sp_zoom: 1;
	--unec_sp_zoom_hover: 1.04;
	--unec_sp_focus: var(--unec_sp_on_dark);
	--unec_sp_motion: 0.35s;
}

/* ------------------------------------------------------------------ *
 * 2. The container release
 *
 * This module ships its own copy rather than borrowing unec-service's:
 * that stylesheet is enqueued only on pages carrying a unec_svc shortcode,
 * so the shared rule is a coincidence, not infrastructure.
 * See claude/container-release.md.
 * ------------------------------------------------------------------ */

#top .unec_sp_host .container,
#top .unec_svc_host .container,
#top .container_wrap:has(> .container .unec_sp_sec:not(.unec_sp_sec_contained)) > .container {
	max-width: 100% !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

#top .unec_sp_host .content,
#top .unec_sp_host .flex_column,
#top .unec_sp_host .entry-content-wrapper,
#top .container_wrap:has(> .container .unec_sp_sec:not(.unec_sp_sec_contained)) .content,
#top .container_wrap:has(> .container .unec_sp_sec:not(.unec_sp_sec_contained)) .flex_column,
#top .container_wrap:has(> .container .unec_sp_sec:not(.unec_sp_sec_contained)) .entry-content-wrapper {
	float: none;
}

/* ------------------------------------------------------------------ *
 * 3. Section shell
 * ------------------------------------------------------------------ */

#top .unec_sp_sec {
	position: relative;
	display: block;
	width: 100%;
	background-color: var(--unec_sp_ink);
	color: var(--unec_sp_on_dark);
}

/* Enfold styles the bare element (#top div, 1-0-1), which BEATS inheritance
 * from the section, and the cap-trim maths is computed from the font's own
 * metrics — so the whole rhythm would shift with it, silently.
 * claude/services-page.md trap 1. */
#top .unec_sp_sec * {
	font-family: var(--unec_sp_font);
}

#top .unec_sp_sec *,
#top .unec_sp_sec *::before,
#top .unec_sp_sec *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ *
 * 4. Cap-height trim
 * ------------------------------------------------------------------ */

#top .unec_sp_sec .u_sp_trim {
	display: block;
	font-size: var(--u_sp_fs);
	line-height: var(--u_sp_lh);
	letter-spacing: var(--u_sp_ls, 0);
	text-box-trim: trim-both;
	text-box-edge: cap alphabetic;
}

@supports not (text-box-edge: cap alphabetic) {
	#top .unec_sp_sec .u_sp_trim {
		margin-top: calc(-1 * ((var(--u_sp_lh) - var(--unec_sp_em_h) * var(--u_sp_fs)) / 2 + var(--unec_sp_asc_cap) * var(--u_sp_fs)));
		margin-bottom: calc(-1 * ((var(--u_sp_lh) - var(--unec_sp_em_h) * var(--u_sp_fs)) / 2 + var(--unec_sp_desc) * var(--u_sp_fs)));
	}
}

#top .unec_sp_sec .u_sp_title {
	--u_sp_fs: var(--unec_sp_title_fs);
	--u_sp_lh: var(--unec_sp_title_lh);
	--u_sp_ls: var(--unec_sp_title_ls);
}

/* ------------------------------------------------------------------ *
 * 5. The grid
 * ------------------------------------------------------------------ */

#top ul.unec_sp_grid {
	display: grid;
	grid-template-columns: repeat(var(--unec_sp_cols, 2), minmax(0, 1fr));
	gap: var(--unec_sp_gap);
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

#top .unec_sp_cols_1 {
	--unec_sp_cols: 1;
}

#top .unec_sp_cols_2 {
	--unec_sp_cols: 2;
}

#top .unec_sp_cols_3 {
	--unec_sp_cols: 3;
	--unec_sp_title_fs: 72px;
	--unec_sp_title_lh: 70px;
	--unec_sp_pad_x: 80px;
}

/* The type selector in a reset out-ranks a class in the rule meant to
 * override it, so the item rule is written at (1,2,1) to match. */
#top ul.unec_sp_grid li.unec_sp_panel {
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}

#top ul.unec_sp_grid li.unec_sp_panel::marker {
	content: '';
}

/* ------------------------------------------------------------------ *
 * 6. The panel face
 *
 * The whole panel is ONE link and the title is its text, so a screen reader
 * hears one name per panel and Tab stops once. There is nothing else inside
 * to click, so no stretched-link overlay is needed — the anchor IS the
 * panel.
 * ------------------------------------------------------------------ */

#top .unec_sp_sec .unec_sp_face {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	width: 100%;
	min-height: var(--unec_sp_h);
	padding: 0 var(--unec_sp_pad_x);
	background-color: var(--unec_sp_ink);
	color: var(--unec_sp_title_ink);
	text-decoration: none;
	isolation: isolate;
}

#top .unec_sp_sec .unec_sp_media {
	position: absolute;
	inset: 0;
	z-index: -3;
	display: block;
	overflow: hidden;
}

#top .unec_sp_sec .unec_sp_media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: scale(var(--unec_sp_zoom));
	transition: transform var(--unec_sp_motion) ease;
}

/* Figma mirrors the left photograph. That is a per-panel choice, not
 * something to bake into every upload. */
#top .unec_sp_sec .unec_sp_flip .unec_sp_media img {
	scale: -1 1;
}

#top .unec_sp_sec .unec_sp_scrim {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: block;
	background-color: var(--unec_sp_scrim);
	opacity: var(--unec_sp_scrim_a);
	pointer-events: none;
}

#top .unec_sp_sec .unec_sp_tint {
	position: absolute;
	inset: 0;
	z-index: -1;
	display: block;
	background-color: var(--unec_sp_tint);
	opacity: var(--unec_sp_tint_a);
	transition: opacity var(--unec_sp_motion) ease;
	pointer-events: none;
}

#top .unec_sp_sec .unec_sp_body {
	position: relative;
	display: block;
	width: 100%;
	max-width: var(--unec_sp_measure);
}

/*
 * `display: flow-root` is not decoration. Under the negative-margin trim
 * fallback the span's margins COLLAPSE OUT of a plain block heading, so the
 * heading's own box is the untrimmed 88 while the glyphs sit correctly — the
 * two trim paths then disagree about every box above this one. A block
 * formatting context keeps the margins inside, and the heading's box is the
 * cap box in both paths.
 */
#top .unec_sp_sec .unec_sp_title {
	display: flow-root;
	margin: 0;
	padding: 0;
	color: var(--unec_sp_title_ink);
	font-weight: 600;
	text-align: center;
	text-transform: none;
	transition: color var(--unec_sp_motion) ease;
}

/* ------------------------------------------------------------------ *
 * 7. The states
 *
 * Rest is the design's LEFT panel; hover is its RIGHT panel. `:active` is
 * in the list so a touch press gets the same feedback — there is no hover
 * on a phone, and a panel that never acknowledges a tap reads as broken.
 * ------------------------------------------------------------------ */

#top .unec_sp_sec a.unec_sp_face:hover,
#top .unec_sp_sec a.unec_sp_face:focus-visible,
#top .unec_sp_sec a.unec_sp_face:active {
	--unec_sp_tint_a: var(--unec_sp_tint_hover_a);
	--unec_sp_title_ink: var(--unec_sp_ink);
	--unec_sp_zoom: var(--unec_sp_zoom_hover);
}

#top .unec_sp_sec a.unec_sp_face:focus-visible {
	outline: 2px solid var(--unec_sp_focus);
	outline-offset: -6px;
}

/* A panel with no link is not a control and must not offer the affordance. */
#top .unec_sp_sec .unec_sp_static .unec_sp_face {
	cursor: default;
}

@media (prefers-reduced-motion: reduce) {
	#top .unec_sp_sec .unec_sp_tint,
	#top .unec_sp_sec .unec_sp_title,
	#top .unec_sp_sec .unec_sp_media img {
		transition: none;
	}

	#top .unec_sp_sec a.unec_sp_face:hover,
	#top .unec_sp_sec a.unec_sp_face:focus-visible,
	#top .unec_sp_sec a.unec_sp_face:active {
		--unec_sp_zoom: 1;
	}
}

/* ------------------------------------------------------------------ *
 * 8. Responsive — custom properties only, never a re-declaration of a
 * property PHP can write inline (--unec_sp_h / --unec_sp_gap).
 * ------------------------------------------------------------------ */

@media only screen and (max-width: 1400px) {
	#top .unec_sp_sec {
		--unec_sp_title_fs: 76px;
		--unec_sp_title_lh: 74px;
		--unec_sp_pad_x: 100px;
		--unec_sp_measure: 480px;
	}
}

@media only screen and (max-width: 1180px) {
	#top .unec_sp_sec {
		--unec_sp_title_fs: 64px;
		--unec_sp_title_lh: 62px;
		--unec_sp_pad_x: 64px;
		--unec_sp_measure: 400px;
	}
}

@media only screen and (max-width: 1024px) {
	#top .unec_sp_sec {
		--unec_sp_title_fs: 56px;
		--unec_sp_title_lh: 54px;
		--unec_sp_pad_x: 40px;
		--unec_sp_measure: 340px;
	}
}

@media only screen and (max-width: 768px) {
	#top .unec_sp_sec {
		--unec_sp_title_fs: 48px;
		--unec_sp_title_lh: 46px;
		--unec_sp_pad_x: 24px;
		--unec_sp_measure: 100%;
	}

	/* One column below the phone boundary: two halves of a 375px screen give
	 * each panel 187px, which is narrower than the word on it.
	 *
	 * Written at the same specificity as the rule it overrides — a
	 * responsive override shorter than its base rule loses, silently, and a
	 * suite that only checks overflow will never see it.
	 * claude/news-archive-page.md. */
	#top ul.unec_sp_grid {
		grid-template-columns: minmax(0, 1fr);
	}

	#top .unec_sp_sec .unec_sp_face {
		min-height: calc(var(--unec_sp_h) * var(--unec_sp_h_scale, 0.55));
	}
}

@media only screen and (max-width: 480px) {
	#top .unec_sp_sec {
		--unec_sp_title_fs: 40px;
		--unec_sp_title_lh: 40px;
		--unec_sp_h_scale: 0.45;
	}
}

/* There is no hover on a touch screen, so the rest state is all a visitor
 * ever sees there. Keep the tap feedback and drop the zoom, which reads as
 * a lag rather than a response on a finger. */
@media (hover: none) {
	#top .unec_sp_sec {
		--unec_sp_zoom_hover: 1;
	}
}
