/*
Theme Name: Kosma Portfolio
Description: Editorial block theme for the Kosma graphic design portfolio and material library.
Version: 0.5.34
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: kosma-portfolio
*/

:root {
	color-scheme: light;
	--kosma-container-max: 1440px;
	--kosma-gutter: clamp(48px, 3.34vw, 64px);
	--kosma-grid-gap: 24px;
	--kosma-section: clamp(5rem, 9vw, 9rem);
	--kosma-lilac: #f3efff;
	--kosma-pink: #ff8daf;
	--kosma-violet: #cdb2ff;
	--kosma-blush: #f7b6e3;
	--kosma-cream: #fff0c8;
}

html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
.wp-site-blocks, .site-main, .alignwide { min-width: 0; max-width: 100%; }
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
img, svg, video { max-width: 100%; }
figure { margin: 0; }
p { text-wrap: pretty; }
a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
a, button, input, textarea, select { transition: color .18s ease, background-color .18s ease, border-color .18s ease, opacity .18s ease, transform .22s ease; }
a:hover { color: var(--wp--preset--color--accent); }
:where(a, button, input, textarea, select, [contenteditable]):focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }

.kosma-container { width: min(calc(100% - (2 * var(--kosma-gutter))), var(--kosma-container-max)); max-width: var(--kosma-container-max) !important; margin-inline: auto !important; }
.kosma-grid-12 { display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--kosma-grid-gap); }
.kosma-grid-12 > * { min-width: 0; grid-column: 1 / -1; }
.kosma-ribbon-surface { position: relative; overflow: clip; isolation: isolate; }
.kosma-ribbon-surface::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: -3.25rem;
	left: 50%;
	width: min(100vw, 920px);
	aspect-ratio: 920 / 369;
	background: url("assets/background-line.svg") center top / 100% auto no-repeat;
	transform: translateX(-50%);
	pointer-events: none;
}

/* Header */
.site-header { position: relative; z-index: 20; background: color-mix(in srgb, var(--wp--preset--color--paper) 94%, transparent); }
.site-header__inner { align-items: center; padding-block: 1.6rem; }
.site-header__inner > .kosma-logo { grid-column: 1 / span 4; justify-self: start; }
.site-header__inner > .site-header__navigation { grid-column: 8 / -1; justify-self: end; }
.site-header .wp-block-site-title, .site-footer .wp-block-site-title { display: flex; align-items: center; gap: .7rem; margin: 0; font-size: 1.15rem; font-weight: 750; letter-spacing: -.03em; }
.site-header .wp-block-site-title::before, .site-footer .wp-block-site-title::before {
	content: "";
	width: 1.8rem;
	height: .75rem;
	background: radial-gradient(ellipse at 24% 65%, #111 0 29%, transparent 31%), radial-gradient(ellipse at 76% 65%, #111 0 29%, transparent 31%), radial-gradient(circle at 50% 18%, #f7a800 0 13%, transparent 15%);
}
.site-header .wp-block-site-title a, .site-footer .wp-block-site-title a { color: inherit; text-decoration: none; }
.site-header .wp-block-navigation { gap: clamp(1.5rem, 3.3vw, 4rem); font-size: .85rem; }
.site-header .wp-block-navigation-item__content { position: relative; padding-block: .35rem; text-decoration: none; }
.site-header .wp-block-navigation-item__content::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .2s ease; }
.site-header .wp-block-navigation-item__content:hover::after,
.site-header .current-menu-item .wp-block-navigation-item__content::after,
.site-header [aria-current="page"]::after,
body:is(.post-type-archive-kosma_project, .single-kosma_project, .tax-kosma_direction, .tax-kosma_industry) .site-header a[href*="/portfolio/"]::after,
body:is(.post-type-archive-kosma_material, .single-kosma_material, .tax-kosma_material_type, .tax-kosma_topic) .site-header a[href*="/materials/"]::after,
body.kosma-page-contacts .site-header a[href*="/contacts/"]::after { transform: scaleX(1); transform-origin: left; }

/* Shared page headers */
.kosma-page-intro { padding-top: clamp(4.5rem, 8vw, 8.5rem) !important; }
.kosma-page-intro > * { grid-column: 1 / span 11; }
.kosma-page-intro h1, .kosma-page-intro .wp-block-query-title { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); margin: 0; font-size: clamp(4rem, 7.5vw, 8.5rem) !important; line-height: .88; letter-spacing: -.07em; }
.kosma-page-intro h1::after, .kosma-page-intro .wp-block-query-title::after { content: ""; flex: none; width: clamp(82px, 1.6em, 160px); aspect-ratio: 107 / 30; height: auto; background: url("assets/heading-symbols.svg") center / contain no-repeat; }
.kosma-section { padding-top: clamp(2rem, 4vw, 4rem) !important; }
.kosma-chip-list, .kosma-project-filters, .kosma-material-filters { display: flex; flex-wrap: wrap; gap: 0; margin: 1.8rem 0 0; }
.kosma-chip-list a, .kosma-project-filters a, .kosma-material-filters a { display: inline-flex; min-height: 2rem; align-items: center; padding: .35rem .9rem; border: 1px solid var(--wp--preset--color--ink); border-radius: 999px; color: var(--wp--preset--color--ink); font-size: .8rem; text-decoration: none; }
.kosma-chip-list a:hover, .kosma-project-filters a:hover, .kosma-material-filters a:hover,
.kosma-chip-list a[aria-current="page"], .kosma-project-filters a[aria-current="page"], .kosma-material-filters a[aria-current="page"] { background: var(--wp--preset--color--ink); color: #fff; }
.kosma-material-filters a span { display: none; }

/* Home */
.kosma-home-hero { padding-block: clamp(4.5rem, 8vw, 8.5rem) clamp(3.5rem, 6vw, 6rem) !important; }
.kosma-home-hero::before { top: -3rem; }
.kosma-home-hero h1 { grid-column: 1 / span 10; margin: 0; font-size: clamp(4rem, 7vw, 8rem); line-height: .9; letter-spacing: -.065em; text-wrap: balance; }
.kosma-home-project-section { padding-top: 0; }
.kosma-home-project-section > .wp-block-query { grid-column: 1 / -1; }
.kosma-home-projects { display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(4.5rem, 9vw, 9rem) var(--kosma-grid-gap); margin: 0; padding: 0; }
.kosma-home-projects > li { grid-column: 1 / -1; min-width: 0; }
.kosma-home-projects > li:nth-child(2n) .kosma-project-card > a,
.kosma-home-projects > li:nth-child(3n) .kosma-project-card > a { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--kosma-grid-gap); align-items: center; }
.kosma-home-projects > li:nth-child(2n) .kosma-project-card-media { grid-column: 1 / span 6; }
.kosma-home-projects > li:nth-child(2n) .kosma-project-card-body { grid-column: 7 / -1; }
.kosma-home-projects > li:nth-child(3n) .kosma-project-card-media { grid-column: 7 / -1; order: 2; }
.kosma-home-projects > li:nth-child(3n) .kosma-project-card-body { grid-column: 1 / span 6; order: 1; }
.kosma-home-projects > li:nth-child(4n + 1) .kosma-project-card-media { aspect-ratio: 16 / 9; }
.kosma-home-projects .kosma-project-card h2 { font-size: clamp(1.65rem, 2.6vw, 3.1rem); }
.kosma-home-projects .kosma-project-card p { max-width: 44rem; font-size: 1rem; }
.kosma-home-more { grid-column: 7 / -1; margin-top: clamp(4rem, 8vw, 8rem); }
.kosma-arrow-button .wp-block-button__link { display: inline-flex; align-items: center; gap: .8rem; padding: .55rem .6rem .55rem 1.2rem; border: 1px solid currentColor; border-radius: 999px; color: var(--wp--preset--color--ink); background: transparent; font-size: clamp(1rem, 1.5vw, 1.35rem); font-weight: 650; text-decoration: none; }
.kosma-arrow-button span, .kosma-circle-arrow { display: inline-grid; width: 2.35rem; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--wp--preset--color--ink); color: #fff; text-decoration: none; }

/* Portfolio archive */
.kosma-archive-project::before, .kosma-material-archive::before { top: -4rem; }
.kosma-archive-project .kosma-page-intro, .kosma-material-archive .kosma-page-intro { padding-bottom: 1rem; }
.kosma-archive-project .kosma-section, .kosma-material-archive .kosma-section { padding-top: 0 !important; }
.kosma-portfolio-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; }
.kosma-portfolio-grid > li { min-width: 0; }
.kosma-portfolio-grid .kosma-project-card { height: 100%; }
.kosma-portfolio-grid .kosma-project-card > a { position: relative; height: 100%; }
.kosma-portfolio-grid .kosma-project-card-media { height: 100%; min-height: 28rem; aspect-ratio: 3 / 4; }
.kosma-portfolio-grid .kosma-project-card-body { position: absolute; inset: auto 0 0; padding: 4rem 1.25rem 1.25rem; background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff; opacity: 0; transition: opacity .2s ease; }
.kosma-portfolio-grid .kosma-project-card:hover .kosma-project-card-body, .kosma-portfolio-grid .kosma-project-card:focus-within .kosma-project-card-body { opacity: 1; }
.kosma-portfolio-grid .kosma-project-card p { display: none; }
.kosma-portfolio-grid .kosma-project-card-topline { color: rgba(255,255,255,.75); }
.kosma-portfolio-grid .kosma-circle-arrow { position: absolute; right: 1.25rem; bottom: 1.25rem; }

/* Shared project cards */
.kosma-project-card { min-width: 0; }
.kosma-project-card > a { display: grid; gap: 1rem; color: inherit; text-decoration: none; }
.kosma-project-card-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--wp--preset--color--surface); }
.kosma-project-card-image { width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.kosma-project-card-media--video { position: relative; }
.kosma-project-card-media--video .kosma-project-card-image { position: absolute; z-index: 2; inset: 0; opacity: 1; transition: opacity .18s ease, transform .35s cubic-bezier(.2,.7,.2,1); }
.kosma-project-card-video { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.kosma-project-card-media--video.is-video-ready .kosma-project-card-image { opacity: 0; }
.kosma-project-card-media--video.has-video-error .kosma-project-card-video { display: none; }
.kosma-project-card-media--video.has-video-error .kosma-project-card-image { position: relative; opacity: 1; }
.kosma-project-card-placeholder { display: block; width: 100%; height: 100%; background: var(--kosma-lilac); }
.kosma-project-card-body { position: relative; display: grid; gap: .65rem; min-width: 0; }
.kosma-project-card-topline { display: flex; justify-content: space-between; gap: 1rem; color: var(--wp--preset--color--muted); font-size: .78rem; }
.kosma-project-card h2 { max-width: calc(100% - 3rem); margin: 0; font-size: clamp(1.4rem, 2vw, 2.2rem); line-height: 1; }
.kosma-project-card p { margin: 0; color: var(--wp--preset--color--muted); }
.kosma-project-card .kosma-circle-arrow { position: absolute; right: 0; bottom: 0; width: 2.25rem; }
.kosma-project-card > a:hover .kosma-project-card-image { transform: scale(1.018); }

/* Single and generic content */
.kosma-single-cover { margin-block: clamp(2rem, 5vw, 5rem); }
.kosma-single-cover img { display: block; width: 100%; max-height: 78vh; object-fit: cover; }
.kosma-single-body > * { grid-column: 2 / span 8; width: 100%; max-width: none; }
.kosma-contact-intro { max-width: 42ch; margin: 0 0 clamp(32px, 5vw, 64px); color: var(--wp--preset--color--muted); font-size: var(--kosma-type-lead); line-height: 1.3; }
.kosma-contact-list { display: grid; margin: 0; border-top: 1px solid var(--wp--preset--color--ink); }
.kosma-contact-list p { display: grid; grid-template-columns: minmax(90px, .3fr) minmax(0, 1fr); gap: 20px; align-items: baseline; margin: 0; padding: clamp(16px, 2.2vw, 26px) 0; border-bottom: 1px solid var(--wp--preset--color--ink); }
.kosma-contact-list span { color: var(--wp--preset--color--muted); font-size: var(--kosma-type-meta); }
.kosma-contact-list a { color: inherit; font-size: clamp(20px, 2.4vw, 34px); line-height: 1; letter-spacing: -.035em; text-decoration: none; overflow-wrap: anywhere; }
.kosma-contact-list a:hover { color: var(--wp--preset--color--accent); }
.kosma-material-single .kosma-page-intro { padding-bottom: clamp(1rem, 3vw, 2.5rem); }
.kosma-material-single .kosma-page-intro .wp-block-post-terms a { color: inherit; text-decoration: none; }
.kosma-material-single .kosma-page-intro > .wp-block-post-title { grid-column: 1 / -1; }
.kosma-material-intro-meta { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--kosma-grid-gap); margin-top: clamp(28px, 4vw, 56px); padding-top: 16px; border-top: 1px solid var(--wp--preset--color--ink); }
.kosma-material-intro-meta > .kosma-kicker { grid-column: 1 / span 3; margin: 0; color: var(--wp--preset--color--muted); font-size: var(--kosma-type-meta); }
.kosma-material-intro-meta > .wp-block-post-content { grid-column: 5 / span 7; max-width: 56ch; font-size: clamp(16px, 1.35vw, 20px); line-height: 1.4; }
.kosma-material-intro-meta > .wp-block-post-content > :first-child { margin-top: 0; }
.kosma-material-intro-meta > .wp-block-post-content > :last-child { margin-bottom: 0; }
.kosma-material-type-svg .kosma-material-single .kosma-page-intro { padding-bottom: 0; }
.kosma-material-type-svg .kosma-material-single .kosma-page-intro > .wp-block-post-title { padding-bottom: clamp(28px, 4vw, 56px); border-bottom: 1px solid var(--wp--preset--color--ink); }
.kosma-material-type-svg .kosma-material-intro-meta { display: none; }
.wp-block-query-pagination { margin-top: clamp(3rem, 7vw, 6rem); padding-top: 1rem; border-top: 1px solid var(--wp--preset--color--line); }

/* Archive pagination */
.wp-block-query-pagination {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: clamp(12px, 2vw, 24px);
	align-items: center;
	width: 100%;
	margin-top: clamp(48px, 7vw, 88px);
	padding-top: 18px;
	border-top-color: var(--wp--preset--color--ink);
	font-size: var(--kosma-type-meta, 13px);
}
.wp-block-query-pagination > .wp-block-query-pagination-previous { justify-self: start; }
.wp-block-query-pagination > .wp-block-query-pagination-next { justify-self: end; }
.wp-block-query-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) {
	display: inline-flex;
	min-height: 36px;
	align-items: center;
	padding: 7px 14px;
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
	line-height: 1;
	text-decoration: none;
}
.wp-block-query-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next):is(:hover, :focus-visible) {
	background: var(--wp--preset--color--ink);
	color: #fff;
}
.wp-block-query-pagination-numbers {
	display: flex;
	grid-column: 2;
	gap: 4px;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
}
.wp-block-query-pagination-numbers .page-numbers {
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	border: 1px solid transparent;
	border-radius: 50%;
	color: var(--wp--preset--color--ink);
	line-height: 1;
	text-decoration: none;
}
.wp-block-query-pagination-numbers .page-numbers:is(:hover, :focus-visible) {
	border-color: var(--wp--preset--color--ink);
}
.wp-block-query-pagination-numbers .page-numbers.current {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
	color: #fff;
}

/* Footer */
.site-footer { margin-top: clamp(8rem, 15vw, 15rem); padding-block: clamp(2.5rem, 4vw, 4rem); border-top: 1px solid var(--wp--preset--color--ink); background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink); }
.site-footer__navigation { grid-column: 1 / span 5; align-self: start; }
.site-footer__navigation .wp-block-navigation-item__content { color: inherit; font-size: .78rem; text-decoration: none; }
.site-footer__brand { grid-column: 9 / -1; justify-self: end; }
.site-footer__statement { grid-column: 1 / span 10; margin-top: clamp(4rem, 8vw, 8rem); }
.site-footer__statement p { margin: 0 0 .4rem; }
.site-footer__statement h2 { max-width: 24ch; margin: 0; font-size: clamp(2rem, 4vw, 4.8rem); line-height: .96; letter-spacing: -.05em; }
.site-footer__accent { grid-column: 12 / -1; align-self: end; justify-self: end; width: 1.8rem; height: 1.8rem; margin: 0; border-radius: .25rem; background: var(--wp--preset--color--ink); }

@media (max-width: 900px) {
	:root { --kosma-gutter: 32px; --kosma-grid-gap: 20px; }
	.kosma-home-projects > li:nth-child(n) .kosma-project-card > a { display: grid; grid-template-columns: 1fr; }
	.kosma-home-projects > li:nth-child(n) :is(.kosma-project-card-media, .kosma-project-card-body) { grid-column: 1; order: initial; }
	.kosma-portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kosma-portfolio-grid .kosma-project-card-body { opacity: 1; }
	.kosma-home-more { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
	:root { --kosma-gutter: 20px; --kosma-grid-gap: 16px; }
	.site-header__inner { padding-block: 1rem; }
	.site-header__inner > .wp-block-site-title { grid-column: 1 / span 8; }
	.site-header__inner > .site-header__navigation { grid-column: 10 / -1; }
	.wp-block-navigation__responsive-container.is-menu-open { padding: var(--kosma-gutter); background: var(--wp--preset--color--paper) !important; color: var(--wp--preset--color--ink) !important; }
	.kosma-ribbon-surface::before { top: 1rem; height: 11rem; border-width: 30px; }
	.kosma-home-hero { padding-block: 4rem 3.5rem !important; }
	.kosma-home-hero h1 { grid-column: 1 / -1; font-size: clamp(3.2rem, 14vw, 4.8rem); }
	.kosma-page-intro > * { grid-column: 1 / -1; }
	.kosma-page-intro h1, .kosma-page-intro .wp-block-query-title { font-size: clamp(3.4rem, 15vw, 5rem) !important; flex-wrap: wrap; }
	.kosma-page-intro h1::after, .kosma-page-intro .wp-block-query-title::after { font-size: 1.4rem; }
	.kosma-home-projects { gap-block: 4.5rem; }
	.kosma-portfolio-grid { grid-template-columns: 1fr; gap: 1rem; }
	.kosma-portfolio-grid .kosma-project-card-media { min-height: 0; aspect-ratio: 4 / 5; }
	.kosma-single-body > * { grid-column: 1 / -1; }
	.kosma-contact-intro,
	.kosma-contact-list { width: calc(100vw - 40px); max-width: calc(100vw - 40px); }
	.kosma-contact-list p { grid-template-columns: 1fr; gap: 8px; }
	.kosma-material-intro-meta { grid-template-columns: 1fr; gap: 14px; }
	.kosma-material-intro-meta > .kosma-kicker,
	.kosma-material-intro-meta > .wp-block-post-content { grid-column: 1; }
	.site-footer__navigation, .site-footer__brand, .site-footer__statement { grid-column: 1 / -1; justify-self: start; }
	.site-footer__brand { margin-top: 2rem; }
	.site-footer__statement { margin-top: 4rem; }
	.site-footer__accent { grid-column: 12 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; }
}

/* Measured correction against the 920 px reference frames. */
.kosma-logo { display: block; width: 134px; height: 17px; line-height: 0; }
.kosma-logo img { display: block; width: 134px; height: 17px; }
.site-header__inner { padding-block: 44px 18px; }
.kosma-ribbon-surface::before { top: -201px; }
.kosma-page-intro { padding-top: 77px !important; }
.kosma-page-intro h1, .kosma-page-intro .wp-block-query-title { font-size: 64px !important; letter-spacing: -.04em; }
.kosma-page-intro h1::after, .kosma-page-intro .wp-block-query-title::after { width: clamp(82px, 1.6em, 160px); height: auto; }
.kosma-home-hero { padding-block: 71px 72px !important; }
.kosma-home-hero::before { top: -201px; }
.kosma-home-hero h1 { max-width: 684px; font-size: 60px; line-height: .95; letter-spacing: -.055em; }
.kosma-home-projects { gap-block: 88px; }
.kosma-home-projects > li:nth-child(4n + 1) .kosma-project-card-media { aspect-ratio: 1.63 / 1; }
.kosma-home-projects > li:nth-child(2n) .kosma-project-card-media,
.kosma-home-projects > li:nth-child(3n) .kosma-project-card-media { aspect-ratio: 1.62 / 1; }
.kosma-home-projects .kosma-project-card-topline, .kosma-home-projects .kosma-circle-arrow { display: none; }
.kosma-home-projects .kosma-project-card h2 { max-width: none; font-size: 24px; }
.kosma-home-projects .kosma-project-card p { color: var(--wp--preset--color--ink); font-size: 15px; line-height: 1.35; }
.kosma-portfolio-grid .kosma-project-card-media { height: auto; min-height: 0; aspect-ratio: 2 / 3; }
.kosma-chip-list a, .kosma-project-filters a, .kosma-material-filters a { min-height: 27px; padding: 3px 12px; font-size: 12px; }
.kosma-archive-project .kosma-section, .kosma-material-archive .kosma-section { margin-block-start: 0 !important; }
.site-footer { margin-top: 112px; padding-block: 38px 44px; }
.site-footer__statement { margin-top: 68px; }
.site-footer__statement h2 { font-size: 36px; }

@media (min-width: 901px) { .kosma-container { width: 74.35%; } }
@media (min-width: 901px) { .kosma-portfolio-grid .kosma-project-card-media { height: 340px; aspect-ratio: auto; } }

@media (max-width: 900px) {
	.site-header__inner { padding-block: 32px 16px; }
	.kosma-page-intro { padding-top: 72px !important; }
	.kosma-page-intro h1, .kosma-page-intro .wp-block-query-title { font-size: clamp(50px, 8vw, 62px) !important; }
	.kosma-home-hero { padding-block: 66px 52px !important; }
	.kosma-ribbon-surface::before { top: -82px; width: min(920px, 120vw); height: auto; border: 0; background: url("assets/background-line.svg") center top / 100% auto no-repeat; }
}

@media (max-width: 600px) {
	.site-header__inner { padding-block: 22px 12px; }
	.site-header__inner > .kosma-logo { grid-column: 1 / span 8; }
	.kosma-logo, .kosma-logo img { width: 118px; height: auto; }
	.kosma-page-intro { padding-top: 72px !important; }
	.kosma-page-intro h1, .kosma-page-intro .wp-block-query-title { gap: 14px; font-size: clamp(42px, 13vw, 54px) !important; }
	.kosma-page-intro h1::after, .kosma-page-intro .wp-block-query-title::after { width: clamp(68px, 1.5em, 82px); height: auto; font-size: 0; }
	.kosma-home-hero { padding-block: 70px 40px !important; }
	.kosma-home-hero h1 { font-size: clamp(42px, 13vw, 54px); }
	.kosma-home-projects { gap-block: 56px; }
	.site-footer { margin-top: 80px; }
	.site-footer__statement { margin-top: 48px; }
	.site-footer__statement h2 { font-size: 30px; }
}

/* Precision pass: archive alignment, rhythm and controls. */
.kosma-ribbon-surface { overflow: visible; isolation: isolate; }
.kosma-ribbon-surface::before { z-index: -1; }
.kosma-ribbon-surface > * { position: relative; z-index: 1; }
.kosma-ribbon-surface::before, .kosma-home-hero::before { width: 100vw; max-width: none; top: max(-222px, -15.43vw); background-size: 100% auto; background-repeat: no-repeat; }
.site-header__inner { padding-block: 47px 18px; }
.site-header { background: transparent; }
.kosma-ribbon-surface::before,
.kosma-home-hero::before { top: max(-222px, -15.43vw); }
.kosma-page-intro > :is(.kosma-project-filters, .kosma-material-filters, .kosma-font-toolbar) { grid-column: 1 / -1; }
.kosma-portfolio-grid,
.kosma-material-grid { row-gap: 0 !important; column-gap: 0 !important; align-items: start; }
.kosma-portfolio-grid > li,
.kosma-material-grid > li { align-self: start; margin-block: 0 !important; padding: 0; line-height: normal; }
.kosma-portfolio-grid :is(article, a, figure, img),
.kosma-material-grid :is(article, a, figure, img) { vertical-align: top; }
.kosma-portfolio-grid .kosma-project-card,
.kosma-portfolio-grid .kosma-project-card > a { height: auto; }
.kosma-project-card .kosma-circle-arrow { display: none !important; }
.kosma-portfolio-grid .kosma-project-card-media,
.kosma-portfolio-grid .kosma-project-card-image { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; }
.kosma-circle-arrow,
.kosma-arrow-button span { box-sizing: border-box; display: inline-grid; inline-size: 28px; block-size: 28px; min-inline-size: 28px; min-block-size: 28px; padding: 0; place-items: center; border-radius: 50%; line-height: 1; transform: none; }
.kosma-circle-arrow::before { display: block; transform: translateX(.5px); transform-origin: center; }
.kosma-resource-card:hover .kosma-circle-arrow,
.kosma-resource-card:focus-within .kosma-circle-arrow { transform: none; }
.kosma-resource-card:hover .kosma-circle-arrow::before,
.kosma-resource-card:focus-within .kosma-circle-arrow::before { transform: translateX(2px); }
.kosma-project-card .kosma-circle-arrow { inline-size: 28px; block-size: 28px; width: 28px; height: 28px; aspect-ratio: 1; }
.kosma-arrow-button span { font-size: 0; }
.kosma-arrow-button span::before { content: "→"; font-size: 15px; transform: translateX(.5px); }
.site-footer__statement h2 { max-width: 22ch; overflow: visible; text-wrap: balance; }

@media (min-width: 901px) {
	.kosma-portfolio-grid .kosma-project-card-media { height: auto; aspect-ratio: 2 / 3; }
}

@media (max-width: 900px) {
	.site-header__inner { padding-block: 32px 16px; }
	.kosma-ribbon-surface::before, .kosma-home-hero::before { top: -15.43vw; width: 100vw; }
}

@media (max-width: 600px) {
	.site-header__inner { padding-block: 22px 12px; }
	.kosma-ribbon-surface::before, .kosma-home-hero::before { top: -15.43vw; left: 50%; width: 100vw; }
	.kosma-portfolio-grid { gap: 0; }
}

/* Home reference composition. */
.kosma-home-projects > li { margin-block: 0 !important; }
.kosma-home-projects > li:nth-child(3n + 1) .kosma-project-card > a { grid-template-columns: 1fr; }
.kosma-home-projects > li:nth-child(3n + 1) .kosma-project-card-media,
.kosma-home-projects > li:nth-child(3n + 1) .kosma-project-card-body { grid-column: 1 / -1; order: initial; }
.kosma-home-projects > li:nth-child(3n + 1) .kosma-project-card-media { aspect-ratio: 1.63 / 1; }
.kosma-home-projects > li:nth-child(3n + 1) .kosma-project-card > a { gap: 18px; }
.kosma-home-projects > li:nth-child(3n + 2) .kosma-project-card > a,
.kosma-home-projects > li:nth-child(3n + 3) .kosma-project-card > a { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--kosma-grid-gap); align-items: start; }
.kosma-home-projects > li:nth-child(3n + 2) .kosma-project-card-media { grid-column: 1 / span 6; }
.kosma-home-projects > li:nth-child(3n + 2) .kosma-project-card-body { grid-column: 7 / -1; padding-top: 4px; }
.kosma-home-projects > li:nth-child(3n + 3) .kosma-project-card-media { grid-column: 7 / -1; order: 2; }
.kosma-home-projects > li:nth-child(3n + 3) .kosma-project-card-body { grid-column: 1 / span 6; order: 1; padding-top: 4px; }
.kosma-home-projects .kosma-project-card-body { gap: 14px; }
.kosma-arrow-button span::before { content: none; }
.kosma-arrow-button span svg { display: block; width: 16px; height: 16px; transform: none; }
.kosma-home .kosma-home-more { margin-top: 161px; }
.kosma-home .kosma-arrow-button .wp-block-button__link { display: inline-flex; min-width: 0; min-height: 40px; gap: 0; justify-content: center; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #111; font-size: 20px; line-height: 1.1; }
.kosma-home .kosma-arrow-button .wp-block-button__link .kosma-arrow-button__label {
	display: inline-flex;
	inline-size: auto;
	block-size: 40px;
	min-inline-size: 236px;
	min-block-size: 40px;
	aspect-ratio: auto;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	border: 1px solid #111;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font-size: inherit;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}
.kosma-home .kosma-arrow-button .wp-block-button__link .kosma-arrow-button__icon { position: static; inline-size: 40px; block-size: 40px; min-inline-size: 40px; min-block-size: 40px; margin-left: -1px; transform: none; }
.kosma-home .kosma-arrow-button .wp-block-button__link:hover,
.kosma-home .kosma-arrow-button .wp-block-button__link:focus-visible { border-color: #111; background: #fff; color: #111; }
.kosma-home .kosma-arrow-button .wp-block-button__link:hover .kosma-arrow-button__icon { transform: none; }
.kosma-home .kosma-home-hero::before { top: -11.2vw; }
.home,
.home .wp-site-blocks,
.home .site-footer { background: #fff; }
.home .kosma-home-hero { overflow: visible; isolation: isolate; }
.home .kosma-home-hero::before { z-index: -1; }
.home .kosma-home-hero > .kosma-container { position: relative; z-index: 1; }
.home .kosma-home-project-section { position: relative; z-index: 1; }
.home .site-footer { margin-top: 85px; }
.home .site-footer .site-footer__statement { grid-column: 1 / -1; }
.home .site-footer .site-footer__statement p { font-size: 30px !important; font-weight: 650; line-height: 1; letter-spacing: -.035em; }
.home .site-footer .site-footer__statement h2 { max-width: none; font-size: 30px; text-wrap: nowrap; }

@media (max-width: 900px) {
	.kosma-home-projects { gap-block: 64px; }
	.kosma-home-projects > li:nth-child(n) .kosma-project-card > a { grid-template-columns: 1fr; gap: 16px; }
	.kosma-home-projects > li:nth-child(n) :is(.kosma-project-card-media, .kosma-project-card-body) { grid-column: 1; order: initial; padding-top: 0; }
	.kosma-home-projects > li:nth-child(n) .kosma-project-card-media { aspect-ratio: 1.63 / 1; }
}

@media (max-width: 600px) {
	.kosma-home-projects { gap-block: 56px; }
	.kosma-home .kosma-home-more { margin-top: 64px; }
	.kosma-home .kosma-arrow-button .wp-block-button__link { min-width: 240px; font-size: 17px; }
	.kosma-home .kosma-home-hero::before { top: -3vw; }
	.home .site-footer .site-footer__statement p { font-size: 22px !important; }
	.home .site-footer .site-footer__statement h2 { font-size: 26px; text-wrap: balance; }
}

/* Fluid typography anchored to the original 920 px reference layouts. */
:root {
	--kosma-type-display: clamp(44px, 6.95vw, 100px);
	--kosma-type-hero: clamp(46px, 6.52vw, 94px);
	--kosma-type-card-title: clamp(21px, 2.6vw, 36px);
	--kosma-type-body: clamp(15px, 1.25vw, 18px);
	--kosma-type-meta: clamp(12px, .9vw, 14px);
}

.kosma-page-intro h1,
.kosma-page-intro .wp-block-query-title { font-size: var(--kosma-type-display) !important; line-height: .9; }
.kosma-home-hero h1 { max-width: min(74.35vw, 1070px); font-size: var(--kosma-type-hero); line-height: .95; }
.kosma-home-projects .kosma-project-card h2 { font-size: var(--kosma-type-card-title); }
.kosma-home-projects .kosma-project-card p { font-size: var(--kosma-type-body); }
.site-header .wp-block-navigation,
.site-footer__navigation .wp-block-navigation-item__content,
.kosma-project-card-topline { font-size: var(--kosma-type-meta); }
.kosma-project-view h1 { margin: 0; font-size: var(--kosma-type-display); line-height: .9; letter-spacing: -.055em; }
.kosma-project-view .kosma-project-lead { max-width: 48ch; font-size: clamp(18px, 1.8vw, 26px); line-height: 1.25; }
.kosma-project-view .kosma-project-content { font-size: clamp(16px, 1.25vw, 18px); }
.site-footer__statement h2,
.home .site-footer .site-footer__statement h2 { font-size: clamp(26px, 3.26vw, 46px); }
.home .site-footer .site-footer__statement p { font-size: clamp(22px, 3.26vw, 46px) !important; }

@media (max-width: 600px) {
	.kosma-page-intro h1,
	.kosma-page-intro .wp-block-query-title { line-height: .94; }
	.kosma-home-hero h1 { max-width: 100%; line-height: .93; }
	.home .site-footer .site-footer__statement h2 { text-wrap: balance; }

	.wp-block-query-pagination {
		grid-template-columns: 1fr 1fr;
		gap: 14px 8px;
	}
	.wp-block-query-pagination-numbers {
		grid-column: 1 / -1;
		grid-row: 1;
	}
	.wp-block-query-pagination > .wp-block-query-pagination-previous,
	.wp-block-query-pagination > .wp-block-query-pagination-next {
		grid-row: 2;
	}
	.wp-block-query-pagination > .wp-block-query-pagination-next { grid-column: 2; }
	.wp-block-query-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) {
		width: 100%;
		justify-content: center;
	}

	.site-header__inner > .site-header__navigation { grid-column: 9 / -1; }
	.site-header__navigation .wp-block-navigation__responsive-container-open,
	.site-header__navigation .wp-block-navigation__responsive-container-close { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border-radius: 50%; }
	.site-header__navigation .wp-block-navigation__responsive-container-open svg,
	.site-header__navigation .wp-block-navigation__responsive-container-close svg { width: 22px; height: 22px; }
	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open { padding: 20px !important; background: #fff !important; color: #111 !important; }
	.site-header__navigation .wp-block-navigation__responsive-close,
	.site-header__navigation .wp-block-navigation__responsive-dialog { width: 100%; height: 100%; }
	.site-header__navigation .wp-block-navigation__responsive-container-close { top: 0; right: 0; }
	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { align-items: flex-start; padding-top: 88px; }
	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { width: 100%; align-items: flex-start; gap: 0; }
	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; align-items: stretch; border-top: 1px solid #111; }
	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child { border-bottom: 1px solid #111; }
	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; padding: 14px 0; font-size: clamp(30px, 10vw, 40px); line-height: 1; letter-spacing: -.045em; }
	.site-header__navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after { display: none; }

body:not(.term-font) .kosma-material-grid,
	.kosma-portfolio-grid { row-gap: 20px !important; }
}

/* Unified public type hierarchy. Keep this final layer authoritative over
 * earlier reference-specific measurements. */
:root {
	--kosma-type-display: clamp(46px, 6.4vw, 92px);
	--kosma-type-hero: clamp(48px, 6.2vw, 90px);
	--kosma-type-section: clamp(32px, 3.6vw, 52px);
	--kosma-type-subhead: clamp(23px, 2.1vw, 32px);
	--kosma-type-card-title: clamp(20px, 1.8vw, 26px);
	--kosma-type-lead: clamp(18px, 1.7vw, 25px);
	--kosma-type-body: clamp(16px, 1.15vw, 18px);
	--kosma-type-meta: clamp(12px, .88vw, 14px);
	--kosma-leading-body: 1.5;
}

.kosma-container {
	width: min(calc(100vw - (2 * var(--kosma-gutter))), var(--kosma-container-max)) !important;
}
body { font-size: var(--kosma-type-body); line-height: var(--kosma-leading-body); }
:is(h1, h2, h3, h4, .wp-block-query-title) { overflow-wrap: anywhere; text-wrap: balance; }
.kosma-page-intro h1,
.kosma-page-intro .wp-block-query-title {
	max-width: 14ch;
	font-size: var(--kosma-type-display) !important;
	line-height: .92;
	letter-spacing: -.055em;
}
.kosma-home-hero h1 { font-size: var(--kosma-type-hero); line-height: .94; }
.kosma-project-view h1 {
	max-width: 16ch;
	font-size: var(--kosma-type-display);
	line-height: .92;
	letter-spacing: -.055em;
}
.kosma-project-view .kosma-project-lead {
	max-width: 54ch;
	margin-block: clamp(22px, 3vw, 38px);
	font-size: var(--kosma-type-lead);
	line-height: 1.3;
	overflow-wrap: anywhere;
}
.kosma-project-meta dt,
.kosma-kicker,
.kosma-project-card-topline { font-size: var(--kosma-type-meta); line-height: 1.25; }
.kosma-project-meta dd { font-size: clamp(16px, 1.4vw, 20px); line-height: 1.3; }
.kosma-project-view .kosma-project-content,
.kosma-single-body > .wp-block-post-content,
.kosma-material-intro-meta > .wp-block-post-content {
	font-size: var(--kosma-type-body);
	line-height: var(--kosma-leading-body);
}
.kosma-single-body > .wp-block-post-content { max-width: 68ch; }
.kosma-single-body > .wp-block-post-content :is(h2, h3) { margin-block: 2.2em .7em; }
.kosma-single-body > .wp-block-post-content h2 { font-size: var(--kosma-type-section); line-height: 1; }
.kosma-single-body > .wp-block-post-content h3 { font-size: var(--kosma-type-subhead); line-height: 1.08; }
.kosma-home-projects .kosma-project-card h2 { font-size: var(--kosma-type-card-title); line-height: 1.02; }
.kosma-home-projects .kosma-project-card p { max-width: 52ch; font-size: var(--kosma-type-body); line-height: 1.45; }
.kosma-portfolio-grid .kosma-project-card h2 { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.05; }
.site-footer__statement h2,
.home .site-footer .site-footer__statement h2 { font-size: clamp(30px, 3.4vw, 49px); line-height: .98; }

@media (max-width: 600px) {
	:root {
		--kosma-type-display: clamp(40px, 12vw, 50px);
		--kosma-type-hero: clamp(42px, 12.5vw, 52px);
		--kosma-type-section: clamp(30px, 9vw, 38px);
		--kosma-type-subhead: clamp(22px, 6.5vw, 28px);
		--kosma-type-card-title: clamp(20px, 6.5vw, 25px);
		--kosma-type-lead: clamp(18px, 5.5vw, 21px);
	}
	.kosma-page-intro h1,
	.kosma-page-intro .wp-block-query-title,
	.kosma-project-view h1 { max-width: 100%; line-height: .96; }
	.kosma-project-view,
	.kosma-project-view header,
	.kosma-project-view .kosma-project-lead,
	.kosma-single-body > *,
	.kosma-material-grid,
	.kosma-portfolio-grid { min-width: 0; max-width: 100%; }
	.kosma-project-view,
	.kosma-material-grid,
	.kosma-portfolio-grid { width: calc(100vw - 40px); }
	.kosma-project-meta dd { font-size: 17px; }
	.kosma-project-view .kosma-project-lead { width: calc(100vw - 60px); }
	.kosma-home-projects .kosma-project-card p { font-size: 16px; }
}

/* Keep the full-width ribbon inside the document box. Using 100vw here
 * included the browser scrollbar and intermittently widened ribbon pages. */
.kosma-ribbon-surface::before,
.kosma-home-hero::before {
	inset-inline: 0;
	width: auto;
	max-width: none;
	transform: none;
}
