/* ==========================================================================
   Soloma Magic — стилі лендінгу (макет Figma: Desktop 1440 / Mobile 390)
   ========================================================================== */

:root {
	--ink: #000;
	--paper: #fff;
	--bar: #f3d390;
	--straw: #edbe5e;
	--linen: #eae5df;
	--linen-ink: #5e564e;
	--text: #2b2618;
	--hairline: #c9c2b6;
	--on-dark: #d9d3c7;
	--dark-line: #3a3528;

	--serif: "Piazzolla", Georgia, "Times New Roman", serif;
	--sans: "Jost", "Helvetica Neue", Arial, sans-serif;

	--container: 1136px;
	--gutter: 24px;
	--header-h: 89px;
	--photo-shadow: 0 30px 50px -28px rgba(88, 62, 12, .55);
	--ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--sans);
	font-size: 19px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--ink);
	color: var(--paper);
	border-radius: 999px;
}
.skip-link:focus { top: 12px; }

.container {
	width: min(var(--container), 100% - 40px);
	margin-inline: auto;
}

/* ---------- Типографіка ---------- */
.h2 {
	font-family: var(--serif);
	font-weight: 500;
	font-size: 52px;
	line-height: 1.05;
	letter-spacing: -.02em;
	color: var(--ink);
}
.body-text p + p { margin-top: 22px; }

/* ---------- Кнопки ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px 28px;
	border: 1.5px solid var(--ink);
	border-radius: 999px;
	font-family: var(--sans);
	font-weight: 500;
	font-size: 16.8px;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--paper); color: var(--ink); }

.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--straw); }

.btn--accent {
	padding: 20px 34px;
	border: 0;
	background: var(--straw);
	color: var(--ink);
	font-size: 20px;
}
.btn--accent:hover { background: var(--paper); }

.photo-shadow { box-shadow: var(--photo-shadow); }

/* ---------- Шапка ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--bar);
	border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-block: 12px;
}
.site-header__logo { display: block; flex: none; }
.site-header__logo img { width: 83px; height: 64px; object-fit: contain; }

.site-header__right { display: flex; align-items: center; gap: 40px; }

.nav { display: flex; gap: 34px; }
.nav__link {
	position: relative;
	font-size: 16.8px;
	line-height: 1;
	color: var(--ink);
	text-decoration: none;
	white-space: nowrap;
}
.nav__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s var(--ease);
}
.nav__link:hover::after { transform: scaleX(1); }

.burger {
	display: none;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	cursor: pointer;
}
.burger svg { display: block; }
.burger__close { display: none !important; }
.burger[aria-expanded="true"] .burger__open { display: none; }
.burger[aria-expanded="true"] .burger__close { display: block !important; }

.mobile-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	padding: 4px 0 28px;
	background: var(--bar);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .1), 0 28px 40px -28px rgba(88, 62, 12, .6);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__link {
	display: block;
	padding: 18px 0;
	border-top: 1px solid rgba(0, 0, 0, .14);
	font-family: var(--serif);
	font-weight: 500;
	font-size: 27.2px;
	line-height: 1.1;
	color: var(--ink);
	text-decoration: none;
}

/* ---------- Hero ---------- */
.hero { background: var(--straw); padding: 72px 0 18px; }
.hero__inner {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gutter);
	align-items: start;
}
.hero__text { grid-column: 1 / span 7; display: flex; flex-direction: column; align-items: flex-start; }
.hero__title {
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(64px, 9.45vw, 136px);
	line-height: .9;
	letter-spacing: -.035em;
	color: var(--ink);
	overflow-wrap: anywhere;
}
.hero__lead {
	max-width: 400px;
	margin-top: 36px;
	margin-bottom: 40px;
	font-size: 24px;
	line-height: 1.45;
	color: var(--ink);
}
.hero__photo { grid-column: 8 / span 5; aspect-ratio: 4 / 5; overflow: hidden; background: var(--linen); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Мої роботи ---------- */
.works { padding: 176px 0 120px; background: var(--paper); }
.works__inner { transition: opacity .2s var(--ease); }
.works__inner.is-loading { opacity: .45; pointer-events: none; }

.works__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 40px;
	margin-bottom: 48px;
}
.works__title { white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
	display: inline-flex;
	padding: 9px 18px;
	border: 1px solid var(--hairline);
	border-radius: 999px;
	font-size: 16px;
	line-height: 1;
	color: var(--text);
	text-decoration: none;
	transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.works__grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 56px var(--gutter);
}
.works__empty { grid-column: 1 / -1; color: var(--linen-ink); }

.work { grid-column: span var(--span, 12); min-width: 0; }
.work--span-7 { --span: 7; }
.work--span-5 { --span: 5; }
.work--span-4 { --span: 4; }
.work--span-3 { --span: 3; }

.work__link { display: block; color: inherit; text-decoration: none; }
.work__media {
	height: var(--h, 640px);
	overflow: hidden;
	background: var(--linen);
}
.work--b .work__media { --h: 560px; }
.work__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--pos, center);
	transition: transform .6s var(--ease);
}
.work__link:hover .work__img { transform: scale(1.03); }
.work__caption { margin-top: 18px; }
.work__title {
	font-family: var(--serif);
	font-weight: 500;
	font-size: 24px;
	line-height: 1.2;
	color: var(--ink);
}
.work__cat { font-size: 16.8px; line-height: 1.6; color: var(--linen-ink); }

.works__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 64px;
}

.pager { display: flex; gap: 8px; }
.pager__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1px solid var(--hairline);
	border-radius: 999px;
	font-weight: 500;
	font-size: 16.8px;
	line-height: 1;
	color: var(--ink);
	text-decoration: none;
	transition: border-color .2s var(--ease);
}
a.pager__item:hover { border: 1.5px solid var(--ink); }
.pager__item.is-current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pager__item.is-disabled { opacity: .35; }

/* ---------- Про майстриню ---------- */
.about { padding: 120px 0; background: var(--paper); }
.about__inner {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gutter);
	align-items: center;
}
.about__photo { grid-column: 1 / span 5; aspect-ratio: 4 / 5; overflow: hidden; background: var(--linen); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__text { grid-column: 7 / -1; }
.about__quote {
	margin-top: 28px;
	font-family: var(--serif);
	font-size: 32px;
	line-height: 1.35;
	letter-spacing: -.01em;
	color: var(--ink);
}
.about__body { margin-top: 22px; }

/* ---------- Як створюється виріб ---------- */
.process { padding: 120px 0; background: var(--linen); }
.process__inner {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gutter);
	align-items: end;
}
.process__text { grid-column: 1 / span 8; }
.steps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 48px 56px;
	margin-top: 56px;
}
.step { padding-top: 20px; border-top: 1px solid var(--linen-ink); }
.step__num {
	display: block;
	font-family: var(--serif);
	font-size: 17.6px;
	line-height: 1;
	color: var(--linen-ink);
}
.step__title {
	margin-top: 10px;
	font-family: var(--serif);
	font-weight: 500;
	font-size: 24px;
	line-height: 1.2;
	color: var(--ink);
}
.step__text { margin-top: 8px; }
.process__photo {
	grid-column: 10 / -1;
	aspect-ratio: 266 / 473;
	overflow: hidden;
	background: var(--paper);
}
.process__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Контакти + футер ---------- */
.contacts { padding: 128px 0 48px; background: var(--ink); color: var(--on-dark); }
.contacts__cta {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
}
.contacts__title {
	max-width: 560px;
	font-family: var(--serif);
	font-weight: 500;
	font-size: 72px;
	line-height: 1.05;
	letter-spacing: -.02em;
	color: var(--paper);
}
.contacts__lead { margin-top: 24px; font-size: 19.2px; }

.site-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 40px;
	margin-top: 120px;
	padding-top: 28px;
	border-top: 1px solid var(--dark-line);
	font-size: 16px;
	line-height: 1.6;
}
.site-footer__brand { display: flex; align-items: center; gap: 16px; }
.site-footer__logo { width: 67.5px; height: 52px; object-fit: contain; }

/* ---------- Сторінки (запасний шаблон) ---------- */
.page { padding: 96px 0 120px; min-height: 60vh; }
.page__inner { max-width: 760px; }
.page__content { margin-top: 32px; }

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 1180px) {
	.nav { gap: 24px; }
	.site-header__right { gap: 28px; }
	.about__quote { font-size: 28px; }
	.contacts__title { font-size: 60px; }
}

/* Планшет: сітка робіт у 2 колонки */
@media (max-width: 1023px) {
	.works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px var(--gutter); }
	.work { grid-column: auto; }
	.work__media,
	.work--b .work__media { height: auto; aspect-ratio: 4 / 5; }
	.works__head { flex-direction: column; align-items: flex-start; }
}

/* Мобільний макет */
@media (max-width: 900px) {
	:root { --header-h: 81px; }

	.site-header__inner { padding: 12px 0; width: auto; margin-left: 20px; margin-right: 10px; }
	.site-header__logo img { width: 72.65px; height: 56px; }
	.site-header__right { display: none; }
	.burger { display: block; }

	.h2 { font-size: 38.4px; }
	body { font-size: 17px; }

	.hero { padding: 24px 0 0; }
	.hero__inner { display: flex; flex-direction: column; gap: 40px; }
	.hero__text { width: 100%; }
	.hero__title { font-size: min(73.6px, 18.9vw); }
	.hero__lead { max-width: 330px; margin-top: 24px; font-size: 20px; }
	.hero__photo { width: 100%; margin-bottom: -64px; position: relative; z-index: 1; }

	.works { padding: 128px 0 72px; }
	.works__head { gap: 20px; }
	.works__title { white-space: normal; }
	.works__foot { flex-direction: column; margin-top: 104px; }

	.about { padding: 72px 0; }
	.about__inner { display: flex; flex-direction: column; align-items: stretch; gap: 40px; }
	.about__quote { font-size: 24px; }

	.process { padding: 72px 0; }
	.process__inner { display: flex; flex-direction: column; align-items: stretch; gap: 48px; }
	.steps { grid-template-columns: 1fr; gap: 32px; }
	.process__photo { aspect-ratio: 1; }

	.contacts { padding: 80px 0 48px; }
	.contacts__cta { flex-direction: column; align-items: flex-start; gap: 80px; }
	.contacts__title { font-size: 44.8px; }
	.site-footer { flex-direction: column; align-items: flex-start; margin-top: 72px; }
}

@media (max-width: 640px) {
	.works__grid { grid-template-columns: 1fr; gap: 40px; }
	.work__media,
	.work--b .work__media { aspect-ratio: 350 / 437.5; }
}
