/* partials.css */
/* ============================================================
   IKAR — partials.css
   Mirrors the ikar-partials-css block of preview/index-v4.html
   (the design source of truth). Component variants and partial-
   specific styles that the core main.css doesn't cover: skip
   link, header/nav chrome, hero interior variant, editorial /
   research cards, founder-letter (about variant), contact-block
   page variant + inbox/managers lists, site-footer phone, and
   body.has-modal-open (scroll-lock while the catalog modal is open).

   Enqueue (functions.php):
     wp_enqueue_style(
       'ikar-partials',
       IKAR_THEME_URI . '/assets/css/partials.css',
       array( 'ikar-main' ),
       IKAR_THEME_VERSION
     );

   Order matters: this MUST load AFTER ikar-main so the cascade lets
   it extend, not undercut, the core rules. Additive only — never
   redefine a base selector that main.css already owns.
   ============================================================ */

/* ----------------------------------------------------------------
   Skip link (header.php)
   ---------------------------------------------------------------- */
.skip-link {
	position: absolute;
	left: -10000px;
	top: 0;
	z-index: 100;
	padding: var(--s-2) var(--s-3);
	background: var(--navy);
	color: var(--cream-on-navy);
	text-decoration: none;
	font-size: var(--ui);
	letter-spacing: var(--track-ui);
}
.skip-link:focus,
.skip-link:focus-visible {
	left: var(--s-3);
	top: var(--s-3);
	outline: 2px solid var(--cream-on-navy);
	outline-offset: 2px;
}

/* ----------------------------------------------------------------
   CTAs — primary / secondary / page closing
   v2/styles.css only renders text-link CTAs; partials introduce a
   filled navy button (hero primary, page closing) that's missing
   from the static homepage but specced in HOMEPAGE-SPEC.md.
   ---------------------------------------------------------------- */
.cta {
	display: inline-flex;
	align-items: center;
	gap: var(--s-1);
	font-family: var(--font-body);
	font-size: var(--ui);
	letter-spacing: var(--track-ui);
	text-decoration: none;
	transition: background var(--dur-fast) var(--ease),
	            color var(--dur-fast) var(--ease),
	            border-color var(--dur-fast) var(--ease),
	            opacity var(--dur-fast) var(--ease);
}
.cta--primary {
	background: var(--navy);
	color: var(--cream-ground);
	padding: var(--s-2) var(--s-4);
	border-radius: var(--radius-btn);
	border: 1px solid var(--navy);
}
.cta--primary:hover {
	background: var(--deep-ink);
	border-color: var(--deep-ink);
	color: var(--cream-ground);
	opacity: 1;
}
.cta--secondary {
	color: var(--navy);
	border-bottom: 1px solid var(--navy);
	padding: var(--s-1) 0 2px;
	background: none;
}
.cta--secondary:hover {
	color: var(--deep-ink);
	border-bottom-color: var(--deep-ink);
	opacity: 1;
}
.cta--large {
	font-size: var(--body-m);
	padding: var(--s-3) var(--s-5);
}

/* Hero CTA pair — sits inside .hero alongside .hero__dek */
.hero__ctas {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--s-3) var(--s-4);
	margin-top: var(--s-2);
}

/* ----------------------------------------------------------------
   Header — interior catalog link + active state
   ---------------------------------------------------------------- */
.site-nav__list .is-current > a {
	border-bottom-color: var(--deep-ink);
}

/* ----------------------------------------------------------------
   Header — Products dropdown (.site-nav__sub)
   Disclosure pattern: chevron button (aria-expanded, header.js) +
   CSS hover / focus-within on desktop; ≤820px the toggle hides and
   the sub renders inline inside the mobile drawer.
   ---------------------------------------------------------------- */
.site-nav__has-sub {
	position: relative;
	display: flex;
	align-items: center;
	gap: 4px;
}
.site-nav__sub-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 2px;
	cursor: pointer;
	color: var(--deep-ink);
}
.site-nav__sub-toggle svg {
	width: 10px;
	height: 10px;
	transition: transform var(--dur-fast) var(--ease);
}
.site-nav__sub-toggle:focus-visible {
	outline: 2px solid var(--navy);
	outline-offset: 2px;
}
.site-nav__has-sub.is-sub-open .site-nav__sub-toggle svg {
	transform: rotate(180deg);
}

@media (min-width: 821px) {
	.site-nav__sub {
		position: absolute;
		top: calc(100% + var(--s-2));
		left: 50%;
		min-width: 180px;
		margin: 0;
		padding: var(--s-2) var(--s-4);
		display: flex;
		flex-direction: column;
		gap: 0;
		background: var(--cream-card);
		border: 1px solid var(--rule);
		border-radius: var(--radius-card);
		box-shadow: 0 12px 36px rgba(15, 26, 51, 0.12);
		opacity: 0;
		visibility: hidden;
		transform: translate(-50%, 4px);
		transition:
			opacity var(--dur-fast) var(--ease),
			transform var(--dur-fast) var(--ease),
			visibility 0s linear var(--dur-fast);
		z-index: 20;
	}
	/* Hover bridge — keeps the panel open while the pointer crosses the
	   gap between the parent item and the panel. */
	.site-nav__sub::before {
		content: '';
		position: absolute;
		top: calc(-1 * var(--s-2));
		left: 0;
		right: 0;
		height: var(--s-2);
	}
	.site-nav__has-sub:hover .site-nav__sub,
	.site-nav__has-sub:focus-within .site-nav__sub,
	.site-nav__has-sub.is-sub-open .site-nav__sub {
		opacity: 1;
		visibility: visible;
		transform: translate(-50%, 0);
		transition:
			opacity var(--dur-fast) var(--ease),
			transform var(--dur-fast) var(--ease);
	}
	/* inline-block so the is-current underline hugs the label instead of
	   spanning the panel like a divider */
	.site-nav__sub a {
		display: inline-block;
		white-space: nowrap;
		padding: 6px 0;
	}
}

@media (max-width: 820px) {
	/* Full-screen takeover (main.css §13 owns the panel itself). The six
	   lines are always visible, indented under Products behind a line-
	   accent hairline — no disclosure needed, so the toggle steps aside. */
	.site-nav__sub-toggle { display: none; }
	.site-nav__has-sub {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.site-nav__sub {
		margin: 0 0 var(--s-3);
		padding: 0 0 0 var(--s-4);
		display: flex;
		flex-direction: column;
		gap: 0;
		align-items: stretch;
		border-left: 1px solid var(--rule-strong);
	}
	.site-nav__sub a {
		display: block;
		padding: var(--s-2) 0;
		font-size: 1rem;
		/* 0.7 alpha ink — the documented AA floor on cream. */
		color: rgba(15, 26, 51, 0.7);
	}
	.site-nav__sub a:hover { color: var(--deep-ink); }
}

@media (prefers-reduced-motion: reduce) {
	.site-nav__sub,
	.site-nav__sub-toggle svg {
		transition: none;
	}
}

/* prevents body-scroll lock from CSS perspective when drawer is
   open — JS adds .has-nav-open. Keep light: no overlay.
   .has-modal-open does the same for the catalogue modal (all viewports). */
body.has-nav-open,
body.has-modal-open {
	overflow: hidden;
}
@media (min-width: 821px) {
	body.has-nav-open { overflow: auto; }
}

/* ----------------------------------------------------------------
   Eyebrow — center alignment (certification strip + others)
   ---------------------------------------------------------------- */
.eyebrow--center {
	text-align: center;
}

/* ----------------------------------------------------------------
   Proof block — accent variant for product-line pages
   ---------------------------------------------------------------- */
.proof__eyebrow {
	color: var(--proof-accent, rgba(239, 237, 230, 0.55));
	margin-bottom: var(--s-4);
}
.section--proof--accent .stat__num {
	color: var(--proof-accent, var(--cream-on-navy));
}

/* ----------------------------------------------------------------
   Product line — foregrounded variant
   v2 only renders Physio with the icon bento. Other lines on their
   own pages may pass an image; render a hero-image variant.
   ---------------------------------------------------------------- */
.physio__hero-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.physio__thesis {
	font-size: var(--body-l);
	line-height: var(--leading-loose);
	color: rgba(15, 26, 51, 0.78);
	max-width: var(--measure);
	margin: var(--s-4) 0 0;
	grid-column: 1;
}
.physio__cta {
	grid-column: 1 / -1;
	margin-top: var(--s-5);
}

/* Per-line accent stripe on the foregrounded section — matches the
   .line-card[data-line="physio"]::before pattern from v2 §8b. */
.section--physio[data-line="add-value"] .physio__eyebrow,
.section--physio[data-line="add-value"] .physio__sub,
.section--physio[data-line="add-value"] .physio__claim-num {
	color: var(--line-add-value);
}
.section--physio[data-line="correct"] .physio__eyebrow,
.section--physio[data-line="correct"] .physio__sub,
.section--physio[data-line="correct"] .physio__claim-num {
	color: var(--line-correct);
}
.section--physio[data-line="intense"] .physio__eyebrow,
.section--physio[data-line="intense"] .physio__sub,
.section--physio[data-line="intense"] .physio__claim-num {
	color: var(--line-intense);
}
.section--physio[data-line="assist"] .physio__eyebrow,
.section--physio[data-line="assist"] .physio__sub,
.section--physio[data-line="assist"] .physio__claim-num {
	color: var(--line-assist);
}
.section--physio[data-line="improve"] .physio__eyebrow,
.section--physio[data-line="improve"] .physio__sub,
.section--physio[data-line="improve"] .physio__claim-num {
	color: var(--line-improve);
}

/* ----------------------------------------------------------------
   Editorial card — accent mark + clickable title
   ---------------------------------------------------------------- */
.research-card__title-link {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition: background-size var(--dur-fast) var(--ease);
}
.research-card__title-link:hover {
	opacity: 1;
	background-size: 100% 1px;
}
.editorial-card__line-mark {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: var(--s-1);
	vertical-align: middle;
	transform: translateY(-1px);
}

/* ----------------------------------------------------------------
   Founder-letter (about variant — cream ground)
   ---------------------------------------------------------------- */
.founder-letter {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(32px, 4vw, 64px);
	max-width: var(--max-content);
	margin: 0 auto;
}
@media (min-width: 821px) {
	.founder-letter:has(.founder-letter__portrait) {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	}
}
.founder-letter__portrait {
	margin: 0;
	background: var(--cream-card);
	aspect-ratio: 4 / 5;
	overflow: hidden;
}
.founder-letter__portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.founder-letter__quote {
	font-size: var(--body-l);
	line-height: var(--leading-body);
	font-style: normal;
	color: var(--deep-ink);
	max-width: var(--measure);
}
/* Optional pulled-larger opening sentence (markup may wrap the first
   sentence in this span). Reads as a lede, not the 56px display headline
   the about-variant used to render. */
.founder-letter__lead {
	display: block;
	font-size: var(--display-s);
	line-height: var(--leading-snug);
	margin-bottom: var(--s-3);
}
.founder-letter__quote .founder-quote__name {
	color: var(--deep-ink);
}
.founder-letter__quote .founder-quote__role {
	color: rgba(15, 26, 51, 0.6);
}
/* Compact portrait — for low-res assets (the current founder photo is
   150×164px) that would blur in the 2-col figure slot. Stays a single
   column; the portrait renders as a small bordered square under the
   signature instead of a dominant facing figure. */
.founder-letter.founder-letter--compact-portrait {
	grid-template-columns: minmax(0, 1fr);
	gap: var(--s-4);
}
.founder-letter--compact-portrait .founder-letter__portrait {
	order: 2;
	width: clamp(96px, 12vw, 132px);
	aspect-ratio: 1 / 1;
	border: 1px solid var(--rule);
	border-radius: var(--radius-card);
}

/* ----------------------------------------------------------------
   Footer — phone link + extended legal strip
   ---------------------------------------------------------------- */
.site-footer__phone {
	color: rgba(239, 237, 230, 0.85);
	text-decoration: none;
	font-size: var(--body-s);
	letter-spacing: 0;
}
.site-footer__phone:hover {
	color: var(--cream-on-navy);
	opacity: 1;
}

/* ----------------------------------------------------------------
   Contact block — page variant
   ---------------------------------------------------------------- */
.contact-block--page {
	padding-block: clamp(72px, 8vw, 128px);
}
.contact-block--page .container {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(48px, 6vw, 96px);
}
@media (min-width: 821px) {
	.contact-block--page .container {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
	}
}
.contact-inbox-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--s-3);
	margin-top: var(--s-3);
}
@media (min-width: 600px) {
	.contact-inbox-list {
		grid-template-columns: 12ch minmax(0, 1fr);
		row-gap: var(--s-3);
		column-gap: var(--s-4);
	}
	.contact-inbox-list__row {
		display: contents;
	}
}
.contact-inbox-list__label {
	font-family: var(--font-mono);
	font-size: var(--ui);
	letter-spacing: var(--track-eyebrow);
	text-transform: uppercase;
	/* 0.7 (not 0.6) is the floor that clears WCAG AA 4.5:1 on cream — see
	   the matching fix on .eyebrow/.byline in main.css. */
	color: rgba(15, 26, 51, 0.7);
	margin: 0;
}
.contact-inbox-list__value {
	margin: 0;
	font-size: var(--body-m);
	line-height: var(--leading-body);
}
.contact-inbox-list__name {
	display: inline-block;
	color: var(--deep-ink);
	font-weight: 500;
}
.contact-managers-list {
	display: grid;
	gap: var(--s-4);
	margin-top: var(--s-3);
}
.contact-managers-list__item {
	border-top: 1px solid var(--rule);
	padding-top: var(--s-3);
}
.contact-managers-list__name {
	font-family: var(--font-display);
	font-size: var(--display-s);
	color: var(--deep-ink);
	margin: 0 0 4px;
	font-weight: 400;
}
.contact-managers-list__region {
	color: rgba(15, 26, 51, 0.6);
	margin: 0 0 var(--s-2);
}
.contact-block__address {
	font-style: normal;
	font-size: var(--body-m);
	line-height: var(--leading-body);
	color: rgba(15, 26, 51, 0.78);
}

/* ----------------------------------------------------------------
   Hero — interior variant (smaller scale)
   ---------------------------------------------------------------- */
.section--hero--interior {
	padding-block: clamp(64px, 7vw, 112px);
}
.section--hero--interior .hero {
	row-gap: clamp(32px, 4vw, 64px);
}
.section--hero--interior .hero__headline {
	max-width: 22ch;
}
.section--hero--interior .hero__dek {
	border-top: 0;
	padding-top: 0;
	grid-template-columns: minmax(0, 1fr);
}
/* The section-bar signature reads as a stray line when it sits directly
   under the site header — every page-opening section drops it (generic:
   whatever section leads <main> on any template); later sections keep
   the ornament. */
#main > .section:first-child .section-bar,
#main > article > .section:first-child .section-bar {
	display: none;
}


/* ----------------------------------------------------------------
   ROUND 2 — Contact team grid (partials/team-grid.php)
   Ported verbatim from preview/contacts.html. 4-col → 3 (1024) →
   2 (820) → 1 (480). Figure is a 4/5 cream tile; when there is no
   headshot a navy-on-cream monogram tile stands in (initials, mono),
   flagged "PORTRAIT PENDING". Navy (#1F3A6E) on cream ≥ 4.5:1 for the
   phone/email links. Fade-in stagger gated under no-preference. Token-only.
   ---------------------------------------------------------------- */
.people {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: clamp(24px, 3vw, 40px);
	row-gap: clamp(40px, 5vw, 64px);
	margin-top: var(--s-5);
	/* Four named tracks — portrait, name, role/region, contacts — so every
	   card in a row can share them via subgrid. Each .person used to be its
	   own independent grid, which meant a two-line name or job title pushed
	   everything below it out of step with its neighbours. That is the
	   ragged baseline the director drew a green line under in the 2026-08
	   review ("neišlygiuotos foto"). */
	grid-auto-rows: auto;
}
.person {
	display: grid;
	grid-row: span 4;
	grid-template-rows: subgrid;
	gap: var(--s-2);
	/* min-width:0 + anywhere-wrapping keep one long unbreakable string
	   (a rewritten email, a long URL) from inflating the 1fr columns and
	   pushing the whole grid past the container. */
	min-width: 0;
}
.person a {
	overflow-wrap: anywhere;
}
.person__figure {
	position: relative;
	margin: 0 0 var(--s-2);
	aspect-ratio: 4 / 5;
	background: var(--cream-card);
	overflow: hidden;
	border: 1px solid var(--rule);
}
.person__figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Portraits are centre-cropped to 4:5. Bias the crop upward so heads sit
	   in the frame instead of being sliced by a dead-centre crop. */
	object-position: 50% 22%;
	display: block;
	opacity: 0.94;
	transition: opacity var(--dur-fast) var(--ease);
}
.person:hover .person__figure img { opacity: 1; }
/* Monogram tile shown when no real headshot is available. Reads as a
   brand-aware placeholder (initials in mono on cream), not a broken image. */
.person__monogram {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		linear-gradient(135deg, rgba(31, 58, 110, 0.05) 0%, rgba(31, 58, 110, 0.10) 100%),
		var(--cream-card);
	color: var(--navy);
	font-family: var(--font-mono);
	font-size: clamp(2.4rem, 4.4vw, 3.4rem);
	font-weight: 500;
	letter-spacing: 0.04em;
	user-select: none;
}
.person[data-photo-status="placeholder"] .person__figure::after {
	content: "PORTRAIT PENDING";
	position: absolute;
	bottom: var(--s-2);
	left: 50%;
	transform: translateX(-50%);
	font-family: var(--font-mono);
	font-size: 0.625rem;
	letter-spacing: var(--track-ui);
	text-transform: uppercase;
	color: rgba(31, 58, 110, 0.45);
	white-space: nowrap;
}
.person__name {
	/* Card-scale, not section-scale: --display-s grows to 36px at desktop,
	   which overpowers a 4-up grid tile (client request 2026-07-20). */
	font-size: var(--body-l);
	font-family: var(--font-display);
	margin: 0;
}
.person__role {
	font-size: var(--body-m);
	color: rgba(15, 26, 51, 0.7);
	margin: 0;
}
.person__region {
	font-size: var(--body-s);
	font-style: italic;
	color: rgba(15, 26, 51, 0.62);
	margin: 0;
	line-height: 1.45;
}
.person__contacts {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
}
.person__phone,
.person__email {
	font-size: var(--body-m);
	color: var(--navy);
	text-decoration: none;
	border-bottom: 1px solid rgba(31, 58, 110, 0.22);
	align-self: flex-start;
	transition: border-color var(--dur-fast) var(--ease);
	width: max-content;
	max-width: 100%;
}
.person__phone:hover,
.person__email:hover { border-bottom-color: var(--navy); opacity: 1; }
.person__email-pending {
	font-size: var(--ui);
	letter-spacing: var(--track-ui);
	text-transform: uppercase;
	color: rgba(15, 26, 51, 0.5);
}
@media (max-width: 1024px) { .people { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .people { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .people { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: no-preference) {
	/* Person card: subtle entrance choreography — the figure fades in
	   with a small clip-path reveal from top to bottom, 60ms staggered
	   across the grid when the team section becomes visible. */
	.section--team.fade-in .person__figure {
		transition: clip-path 600ms var(--ease-out-quint, cubic-bezier(0.22, 1, 0.36, 1));
		clip-path: inset(0 0 0 0);
	}
	/* Scoped to `.js` (added by main.js): `.is-visible` is JS-only, so without
	   this scope `:not(.is-visible)` matches unconditionally and — being
	   higher-specificity than the plain visible rule above — permanently
	   clips every portrait to zero height for no-JS users. */
	.js .section--team.fade-in:not(.is-visible) .person__figure {
		clip-path: inset(0 0 100% 0);
	}
	/* Stagger by position, capped. The old block hardcoded ten delays for a
	   roster that is now eleven people, so the last card had no delay and
	   popped in ahead of its neighbours. nth-child(n+11) collapses the tail
	   onto one delay instead of growing the list every time someone joins. */
	.section--team.fade-in .person:nth-child(1) .person__figure { transition-delay: 0ms; }
	.section--team.fade-in .person:nth-child(2) .person__figure { transition-delay: 60ms; }
	.section--team.fade-in .person:nth-child(3) .person__figure { transition-delay: 120ms; }
	.section--team.fade-in .person:nth-child(4) .person__figure { transition-delay: 180ms; }
	.section--team.fade-in .person:nth-child(5) .person__figure { transition-delay: 240ms; }
	.section--team.fade-in .person:nth-child(6) .person__figure { transition-delay: 300ms; }
	.section--team.fade-in .person:nth-child(7) .person__figure { transition-delay: 360ms; }
	.section--team.fade-in .person:nth-child(8) .person__figure { transition-delay: 420ms; }
	.section--team.fade-in .person:nth-child(9) .person__figure { transition-delay: 480ms; }
	.section--team.fade-in .person:nth-child(10) .person__figure { transition-delay: 540ms; }
	.section--team.fade-in .person:nth-child(n+11) .person__figure { transition-delay: 600ms; }
}

/* ----------------------------------------------------------------
   Branches — /contact/ "Our branches" (partials/branches.php).
   Three hairline cards on the cream ground; country in the display
   face at card scale (matches .person__name), contacts as tel/mailto
   links in the .person contact idiom.
   ---------------------------------------------------------------- */
.branches {
	list-style: none;
	margin: var(--s-5) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(20px, 2.4vw, 32px);
}
.branch {
	background: var(--cream-card);
	border: 1px solid var(--rule);
	border-radius: var(--radius-card);
	padding: clamp(20px, 2.4vw, 28px);
	display: flex;
	flex-direction: column;
	gap: var(--s-1);
	min-width: 0;
}
.branch__country {
	font-family: var(--font-display);
	font-size: var(--body-l);
	color: var(--deep-ink);
	margin: 0 0 var(--s-1);
}
.branch__contact {
	display: block;
	width: fit-content;
	font-size: var(--body-m);
	color: var(--navy);
	text-decoration: underline;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}
.branch__contact:hover { color: var(--deep-ink); }
@media (max-width: 820px) {
	.branches { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------
   Hero stat strip — uploaded custom icon (hero_fstats.icon_image).
   Sized to the built-in glyph box so mixing uploaded and built-in
   marks keeps the row rhythm.
   ---------------------------------------------------------------- */
.fstat__icon img {
	display: block;
	width: 30px;
	height: 30px;
	object-fit: contain;
}
