/* PAGES agent: Home, About, Contact, 404. Consumes tokens from modern.css. All selectors are new (hm-, ab-, ct-, pg-, nf-) so the older Figma-exact main.css rules never apply here. */

/* ---------- Shared ---------- */
body.modern.page-slug-home, body.modern.page-slug-about-us, body.modern.page-slug-contact, body.modern.error404 { background: var(--paper); }
body.modern .site-main { margin: 0; padding: 0; }
body.modern .site-main .wp-block-post-content > * { margin-block: 0; }
body.modern .site-main .wp-block-post-content { max-width: none; padding: 0; }

.pg-section { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; box-sizing: border-box; padding: var(--section) var(--gutter); }
.pg-section + .pg-section { padding-top: 0; }
.pg-section > * { margin-block: 0; }
body.modern .pg-section h2, body.modern .pg-cta h2, body.modern .hm-samples h2 { color: var(--navy); margin: 0; }
body.modern .pg-section p { margin: 0; }
body.modern .pg-section figure { margin: 0; }
.pg-section img { display: block; max-width: 100%; }

.pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.pg-head > * { margin: 0; }
.pg-head__title { display: block; }
.pg-head__title > * { margin: 0; }
.pg-head__title .strand { margin-top: 16px; }
.pg-head__more { color: var(--navy); font-weight: 500; padding: 8px 0; }
.pg-head__more:hover { color: var(--blue); }

body.modern .prose { max-width: none; padding-inline: 0; margin: 0; }
body.modern .pg-section .prose > * + * { margin-top: 16px; }
body.modern .pg-section .prose h2 { margin-bottom: 8px; }
body.modern .prose p { max-width: 62ch; }

/* ---------- Home hero ---------- */
.hm-hero {
	position: relative; isolation: isolate; overflow: hidden;
	background: var(--navy); color: var(--white);
	min-height: clamp(560px, 50vw, 720px);
	display: flex; align-items: center;
}
.hm-hero__media { position: absolute; inset: 0 0 0 auto; width: 58%; z-index: -1; overflow: hidden; }
.hm-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.hm-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 0, rgb(19 34 60 / .55) 22%, rgb(19 34 60 / 0) 60%); }
.hm-hero__inner { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; box-sizing: border-box; padding: clamp(72px, 9vw, 120px) var(--gutter); }
body.modern .hm-hero__title { margin: 0; color: var(--white); font-size: var(--fs-display); line-height: 1.02; letter-spacing: -.03em; max-width: 12ch; }
.hm-hero__title .ln { display: block; overflow: hidden; padding-block: .06em; margin-block: -.06em; }
.hm-hero__title .ln > span { display: block; }
body.modern .hm-hero__tag { margin: 28px 0 0; max-width: 34ch; color: rgb(255 255 255 / .86); font-size: 1.125rem; line-height: 1.5; }
.hm-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hm-hero .btn--secondary { color: var(--white); border-color: rgb(255 255 255 / .7); }
.hm-hero .btn--secondary:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
body.modern .hm-hero .btn:focus-visible { outline-color: var(--white); }

@media (prefers-reduced-motion: no-preference) {
	.hm-hero__title .ln > span { transform: translateY(105%); animation: hm-rise .6s var(--ease-out) forwards; }
	.hm-hero__title .ln:nth-child(2) > span { animation-delay: 70ms; }
	.hm-hero__title .ln:nth-child(3) > span { animation-delay: 140ms; }
	.hm-hero__media img { animation: hm-settle .7s var(--ease-out) both; }
}
@keyframes hm-rise { to { transform: none; } }
@keyframes hm-settle { from { transform: scale(1.06); } to { transform: none; } }

@media (max-width: 800px) {
	.hm-hero { align-items: flex-end; min-height: 640px; }
	.hm-hero__media { inset: 0; width: 100%; }
	.hm-hero__media img { object-position: 50% 30%; }
	.hm-hero__media::after { background: linear-gradient(0deg, var(--navy) 0, rgb(19 34 60 / .85) 48%, rgb(19 34 60 / .1) 100%); }
	.hm-hero__inner { padding-block: 48px 40px; }
	.hm-hero__cta .btn { flex: 1 1 100%; }
}

/* ---------- Home: industries (one feature tile, two medium tiles, six list rows) ---------- */
.hm-ind { padding-bottom: clamp(48px, 6vw, 88px); }
.hm-ind .industry-cards { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; width: auto; }
body.modern .hm-ind .industry-card {
	position: relative; display: block; margin: 0; padding: 0; min-height: 0; height: auto; transform: none; translate: none;
	background: none; border: 0; border-radius: 0; box-shadow: none; grid-column: span 6;
}
body.modern .hm-ind .industry-card:hover, body.modern .hm-ind .industry-card:focus-within { transform: none; box-shadow: none; }
body.modern .hm-ind .industry-card:nth-child(n) { margin-top: 0; }
.hm-ind .industry-card__arrow { display: none; }
body.modern .hm-ind .industry-card__media { display: block; position: relative; aspect-ratio: auto; height: auto; border-radius: var(--r-tile); overflow: hidden; background: var(--blue-tint); }
.hm-ind .industry-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.modern .hm-ind .industry-card__title {
	margin: 0; padding: 0; max-width: none; display: block; flex: none;
	font-size: 1.125rem; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--navy);
}
.hm-ind .industry-card__title a { color: inherit; text-decoration: none; }
body.modern .hm-ind .industry-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-tile); }
body.modern .hm-ind .industry-card__title a:focus-visible { outline: none; }
body.modern .hm-ind .industry-card:has(a:focus-visible) { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: var(--r-tile); }
body.modern .hm-ind .industry-card:hover .industry-card__title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* feature */
body.modern .hm-ind .industry-card:nth-child(1) { grid-column: 1 / span 7; grid-row: 1 / span 2; min-height: 380px; }
body.modern .hm-ind .industry-card:nth-child(1) .industry-card__media { position: absolute; inset: 0; border-radius: var(--r-tile); }
body.modern .hm-ind .industry-card:nth-child(1) .industry-card__title {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 72px 28px 26px; color: var(--white);
	font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); border-radius: 0 0 var(--r-tile) var(--r-tile);
	background: linear-gradient(0deg, rgb(19 34 60 / .82), rgb(19 34 60 / 0));
}
/* medium */
body.modern .hm-ind .industry-card:nth-child(2), body.modern .hm-ind .industry-card:nth-child(3) {
	grid-column: 8 / span 5; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: stretch;
	background: var(--white); border: 1px solid var(--line); border-radius: var(--r-tile); overflow: hidden;
}
body.modern .hm-ind .industry-card:nth-child(2) .industry-card__media, body.modern .hm-ind .industry-card:nth-child(3) .industry-card__media { border-radius: 0; height: 100%; min-height: 150px; }
body.modern .hm-ind .industry-card:nth-child(2) .industry-card__title, body.modern .hm-ind .industry-card:nth-child(3) .industry-card__title { align-self: center; padding: 20px 20px; font-size: 1.25rem; }
/* list rows */
body.modern .hm-ind .industry-card:nth-child(n+4) {
	display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 20px;
	padding: 16px 0 0; border-top: 1px solid var(--line);
}
body.modern .hm-ind .industry-card:nth-child(n+4) .industry-card__media { aspect-ratio: 112 / 72; border-radius: var(--r-control); }
body.modern .hm-ind .industry-card:nth-child(n+4) .industry-card__title { font-size: 1.0625rem; }
body.modern .hm-ind .industry-card:nth-child(n+4) .industry-card__title a::after { border-radius: 0; }
body.modern .hm-ind .industry-card:nth-child(n+4):has(a:focus-visible) { border-radius: 0; }

@media (max-width: 1000px) {
	body.modern .hm-ind .industry-card:nth-child(1) { grid-column: 1 / -1; grid-row: auto; min-height: 0; aspect-ratio: 16 / 10; }
	body.modern .hm-ind .industry-card:nth-child(2), body.modern .hm-ind .industry-card:nth-child(3) { grid-column: span 6; grid-template-columns: 1fr; }
	body.modern .hm-ind .industry-card:nth-child(2) .industry-card__media, body.modern .hm-ind .industry-card:nth-child(3) .industry-card__media { height: auto; aspect-ratio: 16 / 9; min-height: 0; }
}
@media (max-width: 640px) {
	.hm-ind .industry-cards { gap: 16px; }
	body.modern .hm-ind .industry-card:nth-child(1) { aspect-ratio: 4 / 3; }
	body.modern .hm-ind .industry-card:nth-child(2), body.modern .hm-ind .industry-card:nth-child(3) { grid-column: 1 / -1; grid-template-columns: 128px minmax(0, 1fr); }
	body.modern .hm-ind .industry-card:nth-child(2) .industry-card__media, body.modern .hm-ind .industry-card:nth-child(3) .industry-card__media { aspect-ratio: auto; height: 100%; min-height: 96px; }
	body.modern .hm-ind .industry-card:nth-child(2) .industry-card__title, body.modern .hm-ind .industry-card:nth-child(3) .industry-card__title { padding: 12px 16px; font-size: 1.125rem; }
	body.modern .hm-ind .industry-card:nth-child(n+4) { grid-column: 1 / -1; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
}

/* ---------- Home: figures (plain spec row) ---------- */
.hm-figures { background: var(--white); border-block: 1px solid var(--line); }
.hm-figures__list { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; box-sizing: border-box; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hm-figures__list > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; margin: 0; padding: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 40px); border-left: 1px solid var(--line); }
.hm-figures__list > div:first-child { border-left: 0; padding-left: 0; }
.hm-figures__list dd { margin: 0; color: var(--navy); font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hm-figures__list dt { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.45; max-width: 28ch; }
@media (max-width: 760px) {
	.hm-figures__list { grid-template-columns: 1fr; }
	.hm-figures__list > div { border-left: 0; border-top: 1px solid var(--line); padding-inline: 0; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 24px; padding-block: 20px; }
	.hm-figures__list > div:first-child { border-top: 0; }
	.hm-figures__list dd { flex: none; min-width: 5.5ch; font-size: 2rem; }
	.hm-figures__list dt { flex: 1; font-size: .9375rem; max-width: none; }
}

/* ---------- Home: why Duguva ---------- */
.hm-why { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding-bottom: clamp(48px, 6vw, 88px); }
.hm-why__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; border-radius: var(--r-hero); }
body.modern .hm-why__copy p { color: var(--ink); }
.hm-proof { margin-top: 32px; display: grid; }
.hm-proof__item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.hm-proof__item:last-child { border-bottom: 1px solid var(--line); }

body.modern .hm-proof h3 { margin: 0 0 4px; color: var(--navy); font-size: 1.125rem; }
body.modern .hm-proof p { margin: 0; color: var(--muted) !important; font-size: .9375rem; max-width: 52ch; }
.hm-why__more { margin-top: 32px !important; }
@media (max-width: 860px) {
	.hm-why { grid-template-columns: 1fr; }
	.hm-why__media img { aspect-ratio: 4 / 3; }
}

/* ---------- Home: mission ---------- */
.hm-mission { padding-top: 0; }
.hm-mission h2 { margin-bottom: clamp(24px, 3vw, 40px) !important; }
.hm-mission__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); }
.hm-mission__item { padding-top: 24px; border-top: 1px solid var(--navy); }
body.modern .hm-mission__item p { color: var(--muted); max-width: 46ch; }
body.modern .hm-mission__item .hm-mission__lead { margin-bottom: 12px; color: var(--navy); font-size: clamp(1.25rem, 1.05rem + .7vw, 1.5rem); line-height: 1.3; font-weight: 600; letter-spacing: -.015em; }
@media (max-width: 760px) { .hm-mission__grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Home: rope samples strip ---------- */
.hm-samples { background: var(--navy); color: var(--white); }
.hm-samples__head { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; box-sizing: border-box; padding: clamp(40px, 5vw, 64px) var(--gutter) 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
body.modern .hm-samples h2 { color: var(--white); font-size: 1.5rem; line-height: 1.2; }
.hm-samples .link { color: var(--white); font-weight: 500; padding: 8px 0; }
.hm-samples .link:hover { color: rgb(255 255 255 / .8); }
body.modern .hm-samples .link:focus-visible { outline-color: var(--white); }
.hm-samples + .rope-samples {
	background: var(--navy); gap: clamp(48px, 7vw, 96px);
	padding: 0 var(--gutter) clamp(40px, 5vw, 64px) max(var(--gutter), calc((100vw - var(--max)) / 2));
	scrollbar-color: rgb(255 255 255 / .35) transparent;
}
.hm-samples + .rope-samples figcaption { text-transform: none; font-size: .8125rem; color: rgb(255 255 255 / .82); }
body.modern .hm-samples + .rope-samples:focus-visible { outline: 2px solid var(--white); outline-offset: -4px; border-radius: 0; }

/* ---------- CTA banner (Home, About; Contact uses --plain) ---------- */
.pg-cta { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; box-sizing: border-box; padding: var(--section) var(--gutter); }
.pg-section + .pg-cta { padding-top: 0; }
.pg-cta__box { background: var(--orange); color: var(--navy); border-radius: var(--r-tile); padding: clamp(28px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.pg-cta__copy { flex: 1 1 420px; max-width: 760px; }
body.modern .pg-cta h2 { color: var(--navy); font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem); line-height: 1.15; margin: 0; }
body.modern .pg-cta p { margin: 16px 0 0; color: var(--navy); font-size: 1.125rem; }
.pg-cta__btn { background: var(--navy); color: var(--white); flex: none; }
body.modern a.pg-cta__btn { color: var(--white); text-decoration: none; }
.pg-cta__btn:hover { background: #1d3357; color: var(--white); }
body.modern .pg-cta__box :where(a):focus-visible { outline-color: var(--navy); }
.pg-cta--plain .pg-cta__box { background: var(--white); border: 1px solid var(--line); align-items: center; }
.pg-cta--plain .pg-cta__btn { background: var(--orange); color: var(--navy); }
body.modern .pg-cta--plain a.pg-cta__btn { color: var(--navy); }
.pg-cta--plain .pg-cta__btn:hover { background: #ff6f47; color: var(--navy); }
body.modern .pg-cta--plain .pg-cta__box :where(a):focus-visible { outline-color: var(--blue); }
@media (max-width: 600px) { .pg-cta__btn { width: 100%; } }

/* ---------- About ---------- */
.page-slug-about-us .breadcrumbs, .page-slug-contact .breadcrumbs { max-width: calc(var(--max) + 2 * var(--gutter)); box-sizing: border-box; padding: 20px var(--gutter) 0; }
.ab-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 7vw, 104px); align-items: center; padding-top: clamp(32px, 5vw, 64px); }
body.modern .ab-intro__title { margin: 0; color: var(--navy); max-width: 14ch; }
body.modern .ab-intro__tag { margin-top: 20px !important; color: var(--muted); font-size: 1.25rem; line-height: 1.4; font-weight: 500; }
body.modern .ab-intro__copy p { font-size: 1.0625rem; }
.ab-intro__copy > .ab-intro__tag + p { margin-top: 32px; }
body.modern .ab-intro__cta { margin-top: 32px !important; }
.ab-intro__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 45%; border-radius: var(--r-hero); }
@media (max-width: 860px) {
	.ab-intro { grid-template-columns: 1fr; }
	.ab-intro__media img { aspect-ratio: 4 / 3; }
}

.ab-strengths { padding-top: 0; }
.ab-strengths__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.ab-strengths__list li { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; border-top: 1px solid var(--navy); margin: 0; }
.ab-strengths__list svg { color: var(--blue); flex: none; }
.ab-strengths__list span { color: var(--navy); font-size: 1.125rem; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; max-width: 18ch; }
@media (max-width: 860px) { .ab-strengths__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; } }
@media (max-width: 420px) { .ab-strengths__list { grid-template-columns: 1fr; } }

.ab-timeline { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 6vw, 88px); padding-top: 0; }
.ab-timeline__list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.ab-timeline__list li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 24px; padding-bottom: 40px; margin: 0; }
.ab-timeline__list li:last-child { padding-bottom: 0; }
.ab-timeline__list li:not(:last-child)::after { content: ""; position: absolute; left: 19.5px; top: 44px; bottom: 4px; width: 1px; background: var(--line); }
.ab-timeline__mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--navy); background: var(--paper); color: var(--navy); font-weight: 600; font-size: .9375rem; }
.ab-timeline__list li:first-child .ab-timeline__mark { background: var(--navy); color: var(--white); }
body.modern .ab-timeline h3 { margin: 6px 0 8px; color: var(--navy); font-size: 1.25rem; }
.ab-timeline__year { margin-left: 8px; color: var(--muted); font-weight: 500; font-size: .9375rem; letter-spacing: 0; }
body.modern .ab-timeline__list p { max-width: 60ch; color: var(--ink); }
@media (max-width: 760px) { .ab-timeline { grid-template-columns: 1fr; } }

.ab-prod { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding-top: 0; }
.ab-prod__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 40%; border-radius: var(--r-hero); }
body.modern .ab-prod__cta { margin-top: 32px !important; }
@media (max-width: 860px) { .ab-prod { grid-template-columns: 1fr; } .ab-prod__media img { aspect-ratio: 4 / 3; } }

.ab-approach { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 88px); align-items: center; padding-top: 0; }
.ab-approach__ring { display: flex; justify-content: center; }
.ab-approach__ring img { width: 100%; max-width: 560px; height: auto; }
body.modern .ab-approach h2 { margin-bottom: 24px !important; }
.ab-approach__list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.ab-approach__list li { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); color: var(--navy); font-size: 1.0625rem; font-weight: 500; }
@media (max-width: 860px) { .ab-approach { grid-template-columns: 1fr; } .ab-approach__ring img { max-width: 360px; } }

/* ---------- Contact ---------- */
.ct { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding-top: clamp(32px, 5vw, 64px); }
body.modern .ct__title { margin: 0 0 clamp(28px, 4vw, 48px); color: var(--navy); }
.ct__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.ct__list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; margin: 0; }
.ct__list svg { width: 44px; height: 44px; padding: 11px; box-sizing: border-box; background: var(--blue-tint); color: var(--navy); border-radius: var(--r-control); }
.ct__list li > div { display: flex; flex-direction: column; padding-top: 1px; }
.ct__label { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.ct__list a, .ct__list li > div > span:not(.ct__label) { color: var(--ink); font-size: 1.0625rem; line-height: 1.5; }
.ct__list a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgb(14 23 38 / .35); padding-block: 2px; }
.ct__list a:hover { color: var(--blue); text-decoration-color: currentColor; }
.ct__social { display: flex; gap: 8px; margin: 32px 0 0 -10px; }
.ct__social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-control); color: var(--navy); }
.ct__social a:hover { background: var(--blue-tint); }

.ct__form { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-tile); padding: clamp(24px, 4vw, 48px); }
.ct__form > * { margin-block: 0; }
body.modern .ct__form h2 { margin: 0; color: var(--navy); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
body.modern .ct__form .lead { margin: 8px 0 32px; color: var(--muted); font-size: 1.0625rem; }
@media (max-width: 900px) { .ct { grid-template-columns: 1fr; } }

/* Form: labels above, 48px controls, inline messages. contact-form.js still adds .control, .field-meta and the +370 prefix. */
body.modern .duguva-form { --f-line: #7c889c; --f-err: #b42318; --f-ok: #146c3f; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; max-width: none; }
body.modern .duguva-form .field { display: flex; flex-direction: column; gap: 8px; position: relative; min-width: 0; max-width: none; margin: 0; }
body.modern .duguva-form .field--full, body.modern .duguva-form .field:has(#duguva-email), body.modern .duguva-form .field:has(#duguva-phone) { grid-column: auto; }
body.modern .duguva-form .field--full { grid-column: 1 / -1; }
body.modern .duguva-form .field > label, body.modern .duguva-form .field:not(.field--full) > label {
	position: static; padding: 0; background: none; pointer-events: auto; z-index: auto; top: auto; left: auto;
	font-size: .9375rem; line-height: 1.3; font-weight: 500; color: var(--ink);
}
body.modern .duguva-form label .req { color: var(--f-err); }
body.modern .duguva-form .control { position: relative; display: block; }
body.modern .duguva-form input[type="text"], body.modern .duguva-form input[type="email"], body.modern .duguva-form input[type="tel"], body.modern .duguva-form textarea {
	font: inherit; font-size: 1rem; line-height: 1.4; letter-spacing: 0; color: var(--ink);
	width: 100%; box-sizing: border-box; min-height: 48px; padding: 12px 14px;
	background: var(--white); border: 1px solid var(--f-line); border-radius: var(--r-control);
	transition: border-color var(--t-fast) ease-out, box-shadow var(--t-fast) ease-out;
}
body.modern .duguva-form textarea { min-height: 144px; resize: vertical; }
body.modern .duguva-form input::placeholder, body.modern .duguva-form textarea::placeholder { color: #6b778b; opacity: 1; }
body.modern .duguva-form input:hover, body.modern .duguva-form textarea:hover { border-color: var(--navy); }
body.modern .duguva-form input:focus, body.modern .duguva-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); outline: none; }
body.modern .duguva-form input:focus-visible, body.modern .duguva-form textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
body.modern .duguva-form .field-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .8125rem; line-height: 1.4; color: var(--muted); min-height: 1.1em; }
body.modern .duguva-form .field-meta__count { flex: none; margin-left: auto; font-variant-numeric: tabular-nums; }
body.modern .duguva-form .field.is-invalid input, body.modern .duguva-form .field.is-invalid textarea { border-color: var(--f-err); box-shadow: 0 0 0 1px var(--f-err); color: var(--ink); padding-right: 14px; background: var(--white); }
body.modern .duguva-form .field.is-invalid > label { color: var(--ink); }
body.modern .duguva-form .field.is-invalid .field-meta__text { color: var(--f-err); font-weight: 500; }
body.modern .duguva-form .field.is-valid input { border-color: var(--f-ok); color: var(--ink); padding-right: 14px; background: var(--white); }
body.modern .duguva-form .field.is-valid > label { color: var(--ink); }
body.modern .duguva-form .field.is-valid .field-meta__text { color: var(--f-ok); }
body.modern .duguva-form .phone-prefix { position: absolute; left: 14px; top: 0; bottom: 0; display: flex; align-items: center; gap: 10px; font-size: 1rem; color: var(--ink); pointer-events: none; }
body.modern .duguva-form .phone-prefix i { display: block; width: 24px; height: 16px; border-radius: 2px; background: linear-gradient(#fdb913 0 33.3%, #006a44 33.3% 66.6%, #c1272d 66.6%); }
body.modern .duguva-form .has-prefix input { padding-left: 94px; }
body.modern .duguva-form button[type="submit"] {
	grid-column: 1 / -1; justify-self: start; min-width: 0; min-height: 48px; padding: 0 32px; box-sizing: border-box;
	background: var(--orange); color: var(--navy); border: 1px solid transparent; border-radius: var(--r-control);
	font: 600 1rem/1 var(--font); letter-spacing: 0; text-transform: none; cursor: pointer;
	transition: background-color var(--t-fast) ease-out, transform 80ms ease-out;
}
body.modern .duguva-form button[type="submit"]:hover { background: #ff6f47; }
body.modern .duguva-form button[type="submit"]:active { transform: translateY(1px); }
body.modern .duguva-form .form-privacy { grid-column: 1 / -1; margin: 0; font-size: .8125rem; line-height: 1.5; color: var(--muted); max-width: 60ch; }
body.modern .duguva-form .form-privacy a { text-decoration: underline; text-underline-offset: 3px; color: var(--navy); }
body.modern .duguva-notice { grid-column: 1 / -1; padding: 16px 18px; border-radius: var(--r-tile); font-size: 1rem; line-height: 1.5; font-weight: 500; border: 1px solid; }
body.modern .duguva-notice--ok { background: #eaf6ef; border-color: #9bd1b1; color: #0f5132; }
body.modern .duguva-notice--err { background: #fdecea; border-color: #f1b5ae; color: #7a1a10; }
@media (max-width: 560px) {
	body.modern .duguva-form { grid-template-columns: 1fr; }
	body.modern .duguva-form button[type="submit"] { justify-self: stretch; }
}

.ct-photo { padding-top: 0; }
.ct-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 50%; border-radius: var(--r-hero); }
@media (max-width: 600px) { .ct-photo img { aspect-ratio: 4 / 3; border-radius: var(--r-tile); } }

/* ---------- 404 ---------- */
.nf__inner { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; box-sizing: border-box; padding: clamp(64px, 10vw, 140px) var(--gutter); }
.nf__inner > * { margin-block: 0; }
body.modern .nf__title { color: var(--navy); margin: 0 0 20px; max-width: 12ch; }
body.modern .nf__lead { margin: 0 0 32px; max-width: 52ch; color: var(--muted); font-size: 1.125rem; }
.nf__search { max-width: 520px; margin: 0 0 24px; }
.nf__search .wp-block-search__inside-wrapper { display: flex; gap: 8px; border: 0; padding: 0; }
.nf__search .wp-block-search__input { flex: 1 1 auto; min-width: 0; min-height: 48px; box-sizing: border-box; padding: 12px 14px; font: inherit; font-size: 1rem; background: var(--white); border: 1px solid #7c889c; border-radius: var(--r-control); color: var(--ink); }
.nf__search .wp-block-search__input:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 2px; }
.nf__search .wp-block-search__button { text-transform: none; letter-spacing: 0; min-height: 48px; padding: 0 24px; margin: 0; background: var(--navy); color: var(--white); border: 0; border-radius: var(--r-control); font: 600 1rem/1 var(--font); cursor: pointer; }
.nf__search .wp-block-search__button:hover { background: #1d3357; }
.nf__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.nf__actions .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; box-sizing: border-box; border-radius: var(--r-control); font: 600 1rem/1 var(--font); letter-spacing: 0; text-transform: none; text-decoration: none; border: 1px solid transparent; }
.nf__actions .is-style-orange .wp-block-button__link { background: var(--orange); color: var(--navy); }
.nf__actions .is-style-orange .wp-block-button__link:hover { background: #ff6f47; }
.nf__actions .is-style-outline .wp-block-button__link { background: transparent; color: var(--navy); border-color: var(--navy); }
.nf__actions .is-style-outline .wp-block-button__link:hover { background: var(--navy); color: var(--white); }
@media (max-width: 560px) { .nf__search .wp-block-search__inside-wrapper { flex-direction: column; } .nf__actions .wp-block-button, .nf__actions .wp-block-button__link { width: 100%; } }

/* Proof icons: real vector marks, 48px tile, navy on blue tint (contrast 12:1) */
.hm-proof__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--r-control); background: var(--blue-tint); color: var(--navy); }
.hm-proof__icon svg { width: 28px; height: 28px; }

/* Contact details: 44px tap rows */
.ct__list a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; align-self: flex-start; }
.ct__list { gap: 12px; }

/* About: the rope ring turns slowly (switched off for reduced motion). */
@media (prefers-reduced-motion: no-preference) {
	.ab-approach__ring img { animation: ab-ring-spin 48s linear infinite; transform-origin: 50% 50%; will-change: transform; }
}
@keyframes ab-ring-spin { to { transform: rotate(360deg); } }

/* EU support page: one card per project, the funding logo on the left, the text on the right. */
body.modern .es { display: flex; flex-direction: column; gap: clamp(20px, 2.5vw, 32px); }
body.modern .es-project { display: flex; flex-direction: column; gap: clamp(16px, 2vw, 28px); padding: clamp(20px, 3vw, 40px); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-tile); }
body.modern .es-project__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: clamp(20px, 3vw, 48px); align-items: center; }
body.modern .es-project--banner .es-project__head { grid-template-columns: minmax(0, 1fr); }
body.modern .es-project figure { margin: 0; }
body.modern .es-project img { width: 100%; height: auto; display: block; }
body.modern .es-project__body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
body.modern .es-project__title { margin: 0; font-size: clamp(1.125rem, 1.6vw, 1.5rem); line-height: 1.3; color: var(--navy); overflow-wrap: anywhere; }
body.modern .es-project__body p { margin: 0; color: var(--ink); line-height: 1.65; overflow-wrap: anywhere; }
@media (max-width: 760px) { body.modern .es-project__head { grid-template-columns: minmax(0, 1fr); } body.modern .es-project:not(.es-project--banner) .es-project__head figure { max-width: 240px; } }

/* Video clip (About hero): the photo is the fallback, the muted looping video fades in over it. */
.clip { position: relative; overflow: hidden; border-radius: var(--r-hero); background: var(--navy); }
.clip > img, .clip .wp-block-image, .clip figure { display: block; margin: 0; }
.ct-photo .clip { aspect-ratio: 21 / 9; }
.ct-photo .clip img { height: 100%; }
.clip__frame, .clip iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.clip.is-playing .clip__frame, .clip.is-playing iframe { opacity: 1; }
/* Cover the box with the 16:9 video and zoom in a little so YouTube's title bar and logo fall outside the crop. */
.clip iframe { inset: auto !important; top: 50% !important; left: 50% !important; width: 140% !important; height: auto !important; aspect-ratio: 16 / 9; min-height: 100%; transform: translate(-50%, -50%); }
@media (max-width: 600px) { .ct-photo .clip { aspect-ratio: 4 / 3; border-radius: var(--r-tile); } }
@media (prefers-reduced-motion: reduce) { .clip__frame, .clip iframe { display: none; } }
