/*
Theme Name:   Lilia
Theme URI:    https://lilia-design.ru/
Author:       Lilia Vakazova
Description:  Minimal bilingual (RU / EN) portfolio theme for an architect and interior designer. Built around Jetpack Portfolio projects: newest work on the front page, every project browsable as an image slider, full-screen viewer, language switcher.
Version:      1.0.1
Requires at least: 5.9
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  lilia
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
	--bg:        #f4f2ee;
	--bg-alt:    #ebe8e2;
	--ink:       #161616;
	--ink-soft:  #4a4844;
	--muted:     #8b867e;
	--line:      #d8d4cc;
	--accent:    #8a6f55;
	--dark:      #121212;

	--font-sans:    "Jost", "Helvetica Neue", Arial, sans-serif;
	--font-display: "Cormorant Garamond", "Times New Roman", serif;

	--gutter: clamp(16px, 4vw, 56px);
	--max:    1600px;
	--header-h: 76px;
	--ease:   cubic-bezier(.22, .61, .36, 1);
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-sans);
	font-weight: 300;
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color .25s var(--ease), opacity .25s var(--ease); }
a:hover { color: var(--accent); }

p { margin: 0 0 1.2em; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: -.01em;
	margin: 0 0 .5em;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link:focus {
	clip: auto; width: auto; height: auto;
	z-index: 1000; top: 8px; left: 8px;
	padding: 8px 16px; background: var(--ink); color: var(--bg);
}

.wrap {
	width: 100%;
	max-width: var(--max);
	margin: 0 auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

/* Small uppercase label used everywhere: indices, meta, nav. */
.label {
	font-family: var(--font-sans);
	font-size: 11px;
	font-weight: 400;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--muted);
}

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: .8em;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .18em;
	text-transform: uppercase;
	padding-bottom: 4px;
	border-bottom: 1px solid currentColor;
}
.link-arrow::after { content: "\2192"; transition: transform .3s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ==========================================================================
   3. Header
   ========================================================================== */

.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 50;
	height: var(--header-h);
	transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
	border-bottom: 1px solid transparent;
	color: var(--ink);
}

.site-header .wrap {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

/*
 * The frosted background lives on a pseudo-element: a backdrop-filter on the
 * header itself would trap the fixed full-screen mobile menu inside the header bar.
 */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: rgba(244, 242, 238, .92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 0;
	transition: opacity .35s var(--ease);
	pointer-events: none;
}

body:not(.has-hero) .site-header,
.site-header.is-scrolled {
	border-bottom-color: var(--line);
}
body:not(.has-hero) .site-header::before,
.site-header.is-scrolled::before { opacity: 1; }

.has-hero .site-header:not(.is-scrolled) { color: #fff; }
.has-hero .site-header:not(.is-scrolled) a:hover { color: #fff; opacity: .7; }

.site-header.is-hidden { transform: translateY(-100%); }

.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
	font-size: 15px;
	font-weight: 400;
	letter-spacing: .32em;
	text-transform: uppercase;
}
.brand__role {
	font-size: 10px;
	letter-spacing: .26em;
	text-transform: uppercase;
	opacity: .65;
	margin-top: 3px;
}

.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(20px, 3vw, 40px); }

.site-nav a,
.lang-switch a,
.lang-switch span {
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .is-current > a { border-bottom: 1px solid currentColor; padding-bottom: 3px; }

.lang-switch { display: flex; align-items: center; gap: 8px; }
.lang-switch .sep { opacity: .35; }
.lang-switch a { opacity: .5; }
.lang-switch a:hover { opacity: 1; }
.lang-switch .is-active { opacity: 1; }

.menu-toggle {
	display: none;
	width: 32px; height: 32px;
	position: relative;
}
.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
	content: "";
	position: absolute;
	left: 4px; right: 4px;
	height: 1px;
	background: currentColor;
	transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.menu-toggle::before { top: 11px; }
.menu-toggle span    { top: 16px; }
.menu-toggle::after  { top: 21px; }

.nav-open .menu-toggle::before { transform: translateY(5px) rotate(45deg); }
.nav-open .menu-toggle span    { opacity: 0; }
.nav-open .menu-toggle::after  { transform: translateY(-5px) rotate(-45deg); }

/* ==========================================================================
   4. Hero (front page: newest project, full screen slider)
   ========================================================================== */

.hero {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 520px;
	background: var(--dark);
	color: #fff;
	overflow: hidden;
}

.hero .slider,
.hero .slider__track,
.hero .slide { height: 100%; }

.hero .slide img {
	width: 100%; height: 100%;
	object-fit: cover;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(to bottom, rgba(0,0,0,.38) 0%, rgba(0,0,0,0) 22%),
		linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 45%);
}

.hero__caption {
	position: absolute;
	z-index: 2;
	left: 0; right: 0; bottom: clamp(28px, 6vh, 64px);
	pointer-events: none;
}
.hero__caption .wrap {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}
.hero__caption a,
.hero__caption button { pointer-events: auto; }

.hero__eyebrow { color: rgba(255,255,255,.75); margin-bottom: 14px; display: block; }

.hero__title {
	font-size: clamp(40px, 7vw, 104px);
	margin: 0 0 22px;
	color: #fff;
}
.hero__title a:hover { color: #fff; opacity: .85; }

.hero .link-arrow { color: #fff; }
.hero .link-arrow:hover { color: #fff; opacity: .8; }

.hero__controls { display: flex; align-items: center; gap: 22px; }
.hero__controls .slider__count { color: #fff; }

.hero .slider__btn {
	position: static;
	transform: none;
	opacity: 1;
	color: #fff;
	border-color: rgba(255,255,255,.5);
	background: transparent;
}
.hero .slider__btn:hover { background: #fff; color: var(--ink); }

.hero__scroll {
	position: absolute;
	z-index: 2;
	left: 50%;
	bottom: 18px;
	width: 1px; height: 44px;
	background: rgba(255,255,255,.5);
	overflow: hidden;
}
.hero__scroll::after {
	content: "";
	position: absolute;
	left: 0; top: -44px;
	width: 1px; height: 44px;
	background: #fff;
	animation: scrollLine 2.4s var(--ease) infinite;
}
@keyframes scrollLine { to { top: 44px; } }

/* ==========================================================================
   5. Sections, intro
   ========================================================================== */

.section { padding: clamp(72px, 11vw, 160px) 0; }
.section + .section { padding-top: 0; }

.section-head {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 24px;
	padding-bottom: 22px;
	margin-bottom: clamp(32px, 5vw, 64px);
	border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: clamp(34px, 4.6vw, 64px); margin: 8px 0 0; }

.intro {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	column-gap: 24px;
	row-gap: 32px;
}
.intro__index { grid-column: 1 / span 3; }
.intro__text { grid-column: 4 / span 8; }
.intro__lead {
	font-family: var(--font-display);
	font-size: clamp(28px, 3.4vw, 50px);
	font-weight: 300;
	line-height: 1.22;
	margin: 0 0 36px;
	color: var(--ink);
}
.intro__lead em { font-style: italic; color: var(--accent); }

.facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 48px 0 44px;
	padding-top: 28px;
	border-top: 1px solid var(--line);
}
.fact__num {
	display: block;
	font-family: var(--font-display);
	font-size: clamp(36px, 4vw, 60px);
	line-height: 1;
	margin-bottom: 10px;
}

/* ==========================================================================
   6. Filters
   ========================================================================== */

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 30px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.filters a {
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--muted);
	padding-bottom: 3px;
	border-bottom: 1px solid transparent;
}
.filters a:hover { color: var(--ink); }
.filters .is-active a { color: var(--ink); border-bottom-color: var(--ink); }
.filters sup { font-size: 9px; margin-left: 3px; letter-spacing: 0; }

/* ==========================================================================
   7. Project grid & cards
   ========================================================================== */

.projects {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(20px, 3vw, 48px);
	row-gap: clamp(56px, 7vw, 110px);
}

.projects--feature > .card:first-child { grid-column: 1 / -1; }
.projects--feature > .card:first-child .slider { aspect-ratio: 16 / 8; }

.card { min-width: 0; }

.card .slider { aspect-ratio: 3 / 2; background: var(--bg-alt); }
.card .slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card .slider:hover .slide img { transform: scale(1.025); }

.card__meta {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: baseline;
	gap: 18px;
	padding-top: 18px;
}
.card__num { min-width: 3.2em; }
.card__title {
	font-size: clamp(22px, 2vw, 30px);
	margin: 0;
	line-height: 1.2;
}
.card__title small {
	display: block;
	font-family: var(--font-sans);
	font-size: 13px;
	color: var(--muted);
	letter-spacing: .02em;
	margin-top: 4px;
}
.card__info { text-align: right; white-space: nowrap; }

.empty { color: var(--muted); padding: 60px 0; }

/* Pagination */
.pagination { margin-top: clamp(56px, 7vw, 100px); display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid var(--line);
	font-size: 13px; letter-spacing: .08em;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }

/* ==========================================================================
   8. Slider (shared by hero, cards and project page)
   ========================================================================== */

.slider { position: relative; overflow: hidden; }

.slider__track {
	display: flex;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.slider__track::-webkit-scrollbar { display: none; }

.slide {
	position: relative;
	flex: 0 0 100%;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	overflow: hidden;
}
.slide > a, .slide > button { display: block; width: 100%; height: 100%; }

.slider__btn {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 46px; height: 46px;
	display: inline-flex; align-items: center; justify-content: center;
	transform: translateY(-50%);
	background: rgba(244, 242, 238, .88);
	color: var(--ink);
	border: 1px solid transparent;
	border-radius: 50%;
	opacity: 0;
	transition: opacity .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.slider__btn svg { width: 16px; height: 16px; }
.slider__btn--prev { left: 14px; }
.slider__btn--next { right: 14px; }
.slider:hover .slider__btn,
.slider__btn:focus-visible { opacity: 1; }
.slider__btn:hover { background: var(--ink); color: var(--bg); }
.slider__btn[disabled] { opacity: 0 !important; pointer-events: none; }

.slider__count {
	font-size: 11px;
	letter-spacing: .18em;
	font-variant-numeric: tabular-nums;
}
.card .slider__count {
	position: absolute;
	z-index: 3;
	right: 14px; bottom: 12px;
	padding: 4px 10px;
	background: rgba(22, 22, 22, .55);
	color: #fff;
	opacity: 0;
	transition: opacity .3s var(--ease);
}
.card .slider:hover .slider__count { opacity: 1; }

.slider__progress {
	position: absolute;
	z-index: 3;
	left: 0; right: 0; bottom: 0;
	height: 2px;
	background: rgba(255,255,255,.25);
}
.slider__progress span {
	display: block;
	height: 100%;
	width: 0;
	background: #fff;
	transition: width .4s var(--ease);
}

@media (hover: none) {
	.slider__btn { display: none; }
	.card .slider__count { opacity: 1; }
}

/* ==========================================================================
   9. Single project
   ========================================================================== */

.project-head {
	padding-top: calc(var(--header-h) + clamp(40px, 6vw, 90px));
	padding-bottom: clamp(32px, 4vw, 56px);
}
.project-head__crumbs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.project-head__crumbs a:hover { color: var(--ink); }
.project-head h1 { font-size: clamp(44px, 7vw, 112px); margin: 0; }
.project-head h1 small {
	display: block;
	font-size: .42em;
	font-style: italic;
	color: var(--ink-soft);
	margin-top: .25em;
}

.viewer { position: relative; }
.viewer .slider { height: min(78vh, 62vw); background: var(--bg-alt); }
.viewer .slide img { width: 100%; height: 100%; object-fit: contain; }
.viewer .slide button { cursor: zoom-in; }

.viewer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
}
.viewer__bar .slider__count { color: var(--ink); }
.viewer__tools { display: flex; gap: 22px; }
.viewer__tools button {
	font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.viewer__tools button:hover { color: var(--ink); }

.thumbs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: thin;
	padding-bottom: 6px;
}
.thumbs button {
	flex: 0 0 auto;
	width: 104px;
	aspect-ratio: 4 / 3;
	opacity: .45;
	transition: opacity .3s var(--ease);
	outline-offset: -1px;
}
.thumbs button:hover { opacity: .8; }
.thumbs button.is-active { opacity: 1; outline: 1px solid var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* Grid view of all images */
.viewer.is-grid .slider,
.viewer.is-grid .thumbs { display: none; }
.viewer:not(.is-grid) .image-grid { display: none; }
.image-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}
.image-grid button { aspect-ratio: 3 / 2; overflow: hidden; cursor: zoom-in; }
.image-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.image-grid button:hover img { transform: scale(1.03); }

.project-body {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	column-gap: 24px;
	row-gap: 40px;
	padding: clamp(56px, 8vw, 120px) 0;
}
.spec { grid-column: 1 / span 4; margin: 0; }
.spec div {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid var(--line);
}
.spec div:last-child { border-bottom: 1px solid var(--line); }
.spec dt { margin: 0; }
.spec dd { margin: 0; font-size: 15px; }
.project-text { grid-column: 6 / span 7; font-size: 18px; color: var(--ink-soft); }
.project-text:empty { display: none; }

.project-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.project-nav a {
	display: grid;
	grid-template-columns: 120px 1fr;
	align-items: center;
	gap: 22px;
	padding: 28px 0;
}
.project-nav a + a,
.project-nav .placeholder + a { border-left: 1px solid var(--line); padding-left: 28px; }
.project-nav a.is-next { grid-template-columns: 1fr 120px; text-align: right; }
.project-nav a.is-next img { order: 2; }
.project-nav img { width: 120px; aspect-ratio: 3 / 2; object-fit: cover; }
.project-nav strong {
	display: block;
	font-family: var(--font-display);
	font-weight: 300;
	font-size: clamp(22px, 2.2vw, 32px);
	line-height: 1.2;
	margin-top: 6px;
}

/* ==========================================================================
   10. Lightbox
   ========================================================================== */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: #0e0e0e;
	color: #fff;
	display: none;
	align-items: center;
	justify-content: center;
}
.lightbox.is-open { display: flex; animation: fadeIn .3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox__stage {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 64px clamp(16px, 7vw, 110px);
	touch-action: pan-y;
}
.lightbox__stage img {
	max-width: 100%;
	max-height: 100%;
	width: auto; height: auto;
	object-fit: contain;
	user-select: none;
	transition: opacity .25s var(--ease);
}
.lightbox__stage img.is-loading { opacity: .25; }

.lightbox__top {
	position: absolute;
	top: 0; left: 0; right: 0;
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px var(--gutter);
}
.lightbox__top .label { color: rgba(255,255,255,.7); }
.lightbox__close { width: 40px; height: 40px; position: relative; }
.lightbox__close::before,
.lightbox__close::after {
	content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 1px; background: #fff;
}
.lightbox__close::before { transform: rotate(45deg); }
.lightbox__close::after  { transform: rotate(-45deg); }

.lightbox .slider__btn {
	opacity: 1;
	background: transparent;
	color: #fff;
	border-color: rgba(255,255,255,.35);
}
.lightbox .slider__btn:hover { background: #fff; color: var(--ink); }
.lightbox .slider__btn--prev { left: clamp(10px, 2vw, 30px); }
.lightbox .slider__btn--next { right: clamp(10px, 2vw, 30px); }

/* ==========================================================================
   11. Pages (about, contacts), generic content
   ========================================================================== */

.page-head {
	padding-top: calc(var(--header-h) + clamp(48px, 8vw, 120px));
	padding-bottom: clamp(40px, 5vw, 72px);
}
.page-head h1 { font-size: clamp(48px, 8vw, 128px); margin: 10px 0 0; }
.page-head p { max-width: 640px; color: var(--ink-soft); margin-top: 20px; }

.entry {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	column-gap: 24px;
	padding-bottom: clamp(72px, 10vw, 150px);
}
.entry__content { grid-column: 4 / span 7; font-size: 18px; color: var(--ink-soft); }
.entry__content h2 { font-size: clamp(32px, 3.4vw, 48px); color: var(--ink); margin-top: 1.4em; }
.entry__content h2:first-child { margin-top: 0; }
.entry__content h3 { font-size: 28px; color: var(--ink); margin-top: 1.4em; }
.entry__content a { border-bottom: 1px solid var(--line); }
.entry__content a:hover { border-color: var(--accent); }
.entry__content img { margin: 0 0 1.5em; }
.entry__content .alignleft {
	float: left;
	max-width: 42%;
	margin: .4em 2.2em 1.4em 0;
}
.entry__content .alignright { float: right; max-width: 42%; margin: .4em 0 1.4em 2.2em; }
.entry__content .aligncenter { margin-left: auto; margin-right: auto; }
.entry__content::after { content: ""; display: table; clear: both; }
.entry__content p[style*="justify"] { text-align: left !important; }
.entry__content figure { margin: 0 0 1.5em; }

.entry__aside { grid-column: 1 / span 3; }

/* About page portrait layout */
.about {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	column-gap: 24px;
	row-gap: 48px;
	padding-bottom: clamp(72px, 10vw, 150px);
}
.about__portrait { grid-column: 1 / span 4; }
.about__portrait img { width: 100%; filter: grayscale(.15); }
.about__portrait figcaption { margin-top: 14px; }
.about .entry__content { grid-column: 6 / span 7; }
.about .entry__content .alignleft,
.about .entry__content .alignright { display: none; }

/* Contacts */
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 24px;
	padding: 26px 0;
	border-bottom: 1px solid var(--line);
	align-items: baseline;
}
.contact-list a,
.contact-list span:not(.label) {
	font-family: var(--font-display);
	font-size: clamp(24px, 3vw, 40px);
	line-height: 1.2;
	word-break: break-word;
}

/* ==========================================================================
   12. Call to action + footer
   ========================================================================== */

.cta {
	background: var(--dark);
	color: #f4f2ee;
	padding: clamp(80px, 12vw, 170px) 0;
}
.cta h2 {
	font-size: clamp(40px, 6.5vw, 100px);
	max-width: 13ch;
	margin: 18px 0 40px;
}
.cta h2 em { font-style: italic; color: #c8b39b; }
.cta .label { color: rgba(244,242,238,.55); }
.cta a:hover { color: #c8b39b; }
.cta__row { display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: center; }

.site-footer {
	background: var(--dark);
	color: rgba(244,242,238,.6);
	border-top: 1px solid rgba(255,255,255,.1);
	padding: 32px 0;
	font-size: 13px;
}
.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px 32px;
}
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; }
.site-footer .label { color: inherit; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   13. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.intro__index { grid-column: 1 / -1; }
	.intro__text { grid-column: 1 / -1; }
	.spec { grid-column: 1 / -1; }
	.project-text { grid-column: 1 / -1; }
	.entry__aside { grid-column: 1 / -1; }
	.entry__content { grid-column: 1 / -1; }
	.about__portrait { grid-column: 1 / span 5; }
	.about .entry__content { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
	:root { --header-h: 64px; }

	.menu-toggle { display: block; }

	.site-nav {
		position: fixed;
		inset: 0;
		z-index: -1;
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		gap: 48px;
		padding: var(--header-h) var(--gutter);
		background: var(--bg);
		color: var(--ink);
		opacity: 0;
		visibility: hidden;
		transition: opacity .35s var(--ease), visibility .35s;
	}
	.nav-open .site-nav { opacity: 1; visibility: visible; }
	.nav-open .site-header { color: var(--ink) !important; background: var(--bg); transform: none; }
	.nav-open .site-header::before { opacity: 0; }
	.site-nav ul { flex-direction: column; gap: 18px; }
	.site-nav ul a {
		font-family: var(--font-display);
		font-size: 44px;
		letter-spacing: 0;
		text-transform: none;
	}
	.site-nav .current-menu-item > a,
	.site-nav .current_page_item > a,
	.site-nav .is-current > a { border: 0; font-style: italic; }
	.lang-switch a, .lang-switch span { font-size: 14px; }

	.projects { grid-template-columns: 1fr; }
	.projects--feature > .card:first-child .slider { aspect-ratio: 3 / 2; }

	.hero__caption .wrap { flex-direction: column; align-items: flex-start; }
	.hero__scroll { display: none; }

	.section-head { grid-template-columns: 1fr; }

	.facts { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

	.viewer .slider { height: auto; aspect-ratio: 4 / 3; }
	.viewer__tools .js-grid-toggle { display: none; }
	.thumbs button { width: 76px; }

	.project-nav { grid-template-columns: 1fr; }
	.project-nav a,
	.project-nav a.is-next { grid-template-columns: 88px 1fr; text-align: left; }
	.project-nav a.is-next img { order: 0; }
	.project-nav img { width: 88px; }
	.project-nav a + a,
	.project-nav .placeholder + a { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
	.project-nav .placeholder { display: none; }

	.about__portrait { grid-column: 1 / span 8; }
	.contact-list li { grid-template-columns: 1fr; gap: 6px; }
	.entry__content .alignleft, .entry__content .alignright { float: none; max-width: 100%; margin: 0 0 1.5em; }
}

@media (max-width: 520px) {
	body { font-size: 16px; }
	.brand__name { font-size: 13px; letter-spacing: .24em; }
	.brand__role { display: none; }
	.card__meta { grid-template-columns: 1fr auto; }
	.card__num { display: none; }
	.facts .label { font-size: 9px; letter-spacing: .12em; }
	.image-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.slider__track { scroll-behavior: auto; }
	.js .reveal { opacity: 1; transform: none; }
}
