/*
Theme Name: ACA Project
Theme URI: https://aca-project.com
Author: АСА ПРОДЖЕКТ ООД
Description: Изчистена двуезична (BG/EN) тема-албум за АСА ПРОДЖЕКТ ООД: сменящи се изображения на началната страница, проекти като превюта, страница с галерия за всеки обект и контакти с форма.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: aca-project
*/

/* Дигитален албум: бяло поле, изображенията водят, текстът е само имена. */
:root {
	--ink: #0B0257;
	--green: #005E1C;
	--paper: #FFFFFF;
	--wash: #F3F4F8;
	--text: #17153A;
	--muted: #63657F;
	--line: rgba(11, 2, 87, .14);
	--line-strong: rgba(11, 2, 87, .5);

	--display: "Jost", "Futura", "Century Gothic", "Trebuchet MS", sans-serif;
	--body: "Onest", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

	--wrap: 1600px;
	--gutter: clamp(16px, 3.2vw, 48px);
	--head: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	background: var(--paper);
	color: var(--text);
	font: 400 1rem/1.6 var(--body);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { top: 12px; }
.mono { font-family: var(--mono); font-size: .8125rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.main { flex: 1 0 auto; display: flex; flex-direction: column; }
.empty { color: var(--muted); padding-block: 64px; }

/* ---------- Header ---------- */
.head {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(8px);
}
.head__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--head); }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); flex: none; }
.brand__logo { height: 54px; width: auto; max-width: 260px; object-fit: contain; }
.brand__name { font: 400 1.3rem/1 var(--display); letter-spacing: .14em; }
.brand__name b { font-weight: 500; margin-left: .35em; color: var(--green); }

.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.nav > a {
	font: 400 .9375rem/1 var(--display);
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ink);
	padding: 10px 0;
	border-bottom: 1.5px solid transparent;
	transition: border-color .2s, color .2s;
}
.nav > a:hover { color: var(--green); }
.nav > a[aria-current="page"] { border-bottom-color: var(--green); }
.lang { display: inline-flex; gap: 2px; }
.lang a {
	font: 500 .75rem/1 var(--mono);
	letter-spacing: .08em;
	padding: 7px 6px;
	text-decoration: none;
	color: var(--muted);
}
.lang a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
	:root { --head: 68px; }
	.brand__logo { height: 42px; max-width: 200px; }
	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 44px; height: 44px; border: 0; background: none; cursor: pointer; color: var(--ink);
	}
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
		display: block; width: 22px; height: 1.5px; background: currentColor; position: relative; transition: transform .2s;
	}
	.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle__bars::before { top: -7px; }
	.nav-toggle__bars::after { top: 7px; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }
	.nav {
		position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 0;
		background: var(--paper); border-bottom: 1px solid var(--line);
		padding: 4px var(--gutter) 20px;
		display: none;
	}
	.nav.is-open { display: flex; }
	.nav > a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
	.nav > a[aria-current="page"] { color: var(--green); border-bottom-color: var(--line); }
	.lang { align-self: flex-start; margin-top: 14px; }
}

/* ---------- Начало: албум ---------- */
.home .main { min-height: 0; }
.stage { flex: 1 0 auto; display: flex; flex-direction: column; }
.stage__frame {
	position: relative;
	flex: 1 0 auto;
	height: calc(100svh - var(--head) - 120px);
	min-height: 260px;
	margin-inline: var(--gutter);
	max-width: 100%;
}
.stage__slide {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transition: opacity 1.4s ease;
}
.stage__slide.is-on { opacity: 1; z-index: 1; }
.stage__slide img { width: 100%; height: 100%; object-fit: contain; }
.stage__bar {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	min-height: 64px;
}
.stage__name {
	font: 500 .8125rem/1.4 var(--mono);
	letter-spacing: .08em;
	color: var(--ink);
	text-decoration: none;
	min-width: 0;
}
.stage__name:hover { color: var(--green); }
.stage__ctrl { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); flex: none; }
.stage__ctrl button {
	width: 40px; height: 40px; border: 0; background: none; color: var(--ink);
	font: 400 1.15rem/1 var(--body); cursor: pointer;
}
.stage__ctrl button:hover { color: var(--green); }
@media (max-width: 760px) {
	.stage__frame { height: auto; flex: 1 1 auto; min-height: 320px; }
}

/* ---------- Проекти ---------- */
.album { padding-block: clamp(16px, 3vw, 40px) clamp(56px, 7vw, 96px); }
.grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(28px, 3.5vw, 56px) clamp(16px, 2.5vw, 36px);
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.card__img { display: block; aspect-ratio: 3 / 2; max-width: 100%; overflow: hidden; background: var(--wash); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, opacity .3s; }
.card:hover .card__img img { transform: scale(1.03); }
.card__name { font: 500 .8125rem/1.45 var(--mono); letter-spacing: .06em; }
.card:hover .card__name { color: var(--green); }

/* ---------- Обект ---------- */
.project { padding-block: clamp(20px, 3vw, 44px) 0; }
.project__name {
	margin: 0 0 clamp(20px, 3vw, 36px);
	font: 400 clamp(1.25rem, .9rem + 1.4vw, 2rem)/1.25 var(--display);
	letter-spacing: .02em;
	color: var(--ink);
	text-wrap: balance;
}
.gallery { display: grid; gap: clamp(12px, 2vw, 28px); }
.gallery__item { display: block; background: var(--wash); cursor: zoom-in; }
.gallery__item img { width: 100%; height: auto; }

.pager {
	display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center;
	padding-block: clamp(32px, 5vw, 56px) clamp(48px, 6vw, 80px);
	font: 500 .8125rem/1.4 var(--mono); letter-spacing: .06em;
}
.pager a { text-decoration: none; color: var(--ink); min-width: 0; }
.pager a:hover { color: var(--green); }
.pager__next { text-align: right; }
.pager__all { text-transform: uppercase; color: var(--muted) !important; }
@media (max-width: 640px) {
	.pager { grid-template-columns: 1fr 1fr; }
	.pager__all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

.lightbox {
	position: fixed; inset: 0; z-index: 100;
	background: rgba(255, 255, 255, .98);
	display: flex; align-items: center; justify-content: center;
	padding: 56px 72px;
}
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox button {
	position: absolute; background: none; border: 0; color: var(--ink);
	width: 52px; height: 52px; font: 400 1.5rem/1 var(--body); cursor: pointer;
}
.lightbox button:hover { color: var(--green); }
.lightbox__close { top: 10px; right: 10px; font-size: 2rem !important; }
.lightbox__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--muted); }
@media (max-width: 640px) {
	.lightbox { padding: 64px 8px; }
	.lightbox__prev, .lightbox__next { top: auto; bottom: 6px; transform: none; }
}

/* ---------- Контакти ---------- */
.contact {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(32px, 6vw, 112px);
	padding-block: clamp(32px, 6vw, 88px) clamp(64px, 8vw, 112px);
	align-items: start;
}
.contact__mails { display: grid; gap: 10px; }
.contact__mails a {
	font: 300 clamp(1.35rem, .9rem + 1.6vw, 2.25rem)/1.25 var(--display);
	color: var(--ink);
	text-decoration: none;
	overflow-wrap: anywhere;
	justify-self: start;
	border-bottom: 1px solid transparent;
	transition: color .2s, border-color .2s;
}
.contact__mails a:hover { color: var(--green); border-color: var(--green); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.form { display: grid; gap: 18px; }
.form p { margin: 0; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font: 500 .75rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field__opt { text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
	width: 100%;
	font: 400 1rem/1.5 var(--body);
	color: var(--text);
	background: var(--paper);
	border: 0;
	border-bottom: 1px solid var(--line-strong);
	border-radius: 0;
	padding: 10px 0;
	transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom: 1.5px solid var(--green); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { padding: 12px 14px; font-size: .9375rem; }
.form__note--ok { background: rgba(0, 94, 28, .08); color: var(--green); }
.form__note--err { background: rgba(160, 20, 20, .07); color: #8a1414; }
.btn {
	display: inline-flex; align-items: center; gap: 12px;
	background: var(--ink); color: #fff; border: 0; cursor: pointer;
	font: 400 .9375rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
	padding: 16px 28px;
	transition: background .2s;
}
.btn:hover { background: var(--green); }

/* ---------- Общи страници ---------- */
.page-head { padding-block: clamp(40px, 7vw, 96px) clamp(24px, 3vw, 40px); }
.page-title { margin: 0; font: 300 clamp(2rem, 1.2rem + 3vw, 3.5rem)/1.05 var(--display); color: var(--ink); text-wrap: balance; }
.lead { margin: 20px 0 0; color: var(--text); }
.eyebrow { margin: 0 0 14px; font: 500 .8125rem/1.3 var(--mono); letter-spacing: .1em; color: var(--green); }
.link { color: var(--ink); border-bottom: 1px solid var(--line-strong); text-decoration: none; }
.link:hover { color: var(--green); border-color: var(--green); }
.prose { max-width: calc(68ch + 2 * var(--gutter)); margin-inline: 0; }
.block { padding-block: 0 clamp(64px, 9vw, 128px); }
.block--tight { padding-top: 8px; }
.plain-list { padding-left: 1.1em; }

/* ---------- Footer ---------- */
.foot { flex: none; }
.foot__in {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
	padding-block: 20px;
	font: 400 .75rem/1.4 var(--mono); letter-spacing: .04em; color: var(--muted);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--green); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
