/*
Theme Name: Zotov
Theme URI: https://zotov.design
Author: Nick Zotov
Description: Black-and-white portfolio theme for a logo and brand identity designer. Cases, services, about and contact pages with a working brief form.
Version: 1.2.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zotov
*/

:root {
	--ink: #0D0D0D;
	--black: #000000;
	--white: #FFFFFF;
	--line: #D0D0D0;
	--hair: #E5E5E5;
	--gap: 14px;
	--side: 40px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--ease-io: cubic-bezier(.785, .135, .15, .86);
	--font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font);
	font-weight: 400;
	font-size: 20px;
	line-height: 1.3;
	letter-spacing: -0.02em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--black); font-weight: 500; }
p, figure, blockquote, ul, ol { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: text-decoration-color .3s ease;
}
a:hover, a:focus-visible { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }
strong, b { font-weight: 500; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	left: 14px; top: 14px; z-index: 100; background: var(--white); padding: 10px 14px;
}

/* ---------- Grid ---------- */
.grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gap);
	padding: 0 var(--side);
}
.grid--top { align-items: start; }
.grid--end { align-items: end; }
.pad { padding: 0 var(--side); }

/* ---------- Type ---------- */
.t-h1 { font-weight: 500; font-size: clamp(38px, 5vw, 72px); line-height: 1.17; letter-spacing: -1px; color: var(--black); }
.t-h1--case { font-size: clamp(38px, 3.7vw, 52px); }
.t-h2 { font-weight: 500; font-size: clamp(34px, 3.5vw, 50px); line-height: 1.17; letter-spacing: -1px; color: var(--black); }
.t-h2--row { font-size: clamp(30px, 3.5vw, 50px); line-height: 1.1; }
.t-h3 { font-weight: 500; font-size: 28px; line-height: 1.17; letter-spacing: -1px; color: var(--black); }
.t-statement { font-weight: 400; font-size: clamp(30px, 3.5vw, 50px); line-height: 1.17; letter-spacing: -1px; }
.t-lead { font-size: clamp(21px, 1.95vw, 28px); line-height: 1.17; }
.t-body { font-size: 20px; line-height: 1.3; }
.t-small { font-size: 18px; line-height: 1.3; }
.t-num { font-weight: 300; font-size: 60px; line-height: 1; letter-spacing: -1px; }
.t-strong { font-weight: 500; }
.link-big { font-weight: 500; font-size: clamp(34px, 3.5vw, 50px); line-height: 1.17; letter-spacing: -1px; }
.u { text-decoration: underline; text-underline-offset: 0.12em; }
.u-soft { text-decoration: underline; text-underline-offset: 0.18em; }

/* ---------- Spacing ---------- */
.sec { padding-top: clamp(120px, 18vw, 260px); }
.sec-m { padding-top: clamp(100px, 14vw, 200px); }
.sec-s { padding-top: clamp(80px, 9vw, 130px); }
.mt-l { margin-top: clamp(80px, 12vw, 170px); }
.mt-m { margin-top: clamp(60px, 7vw, 100px); }
.mt-s { margin-top: 40px; }
.mt-xs { margin-top: 14px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	padding: 22px var(--side);
	background: var(--white);
	transition: transform .45s var(--ease);
}
.site-header.is-hidden { transform: translateY(calc(-100% - var(--wp-admin--admin-bar--height, 0px))); }
.site-logo { display: block; line-height: 0; position: relative; z-index: 32; }
.site-logo img, .site-logo .custom-logo { height: 28px; width: auto; }
.site-logo, .site-logo:hover { text-decoration: none; }
.nav ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 8px 24px;
	font-size: 18px; letter-spacing: -0.5px;
}
.nav .current-menu-item > a,
.nav .current_page_item > a,
.nav .current-menu-parent > a,
.nav .current-menu-ancestor > a,
.nav .current_page_parent > a,
.nav .is-current > a { text-decoration: underline; text-underline-offset: 0.18em; }
.burger {
	display: none;
	position: relative; z-index: 32;
	width: 44px; height: 28px; margin-right: -8px;
	border: 0; background: transparent; padding: 0; cursor: pointer;
}
.burger i {
	position: absolute; left: 9px; right: 9px; height: 1.5px; background: var(--black);
	transition: transform .45s var(--ease-io), top .45s var(--ease-io);
}
.burger i:nth-child(1) { top: 9px; }
.burger i:nth-child(2) { top: 17px; }
.site-header.is-open .burger i:nth-child(1) { top: 13px; transform: rotate(45deg); }
.site-header.is-open .burger i:nth-child(2) { top: 13px; transform: rotate(-45deg); }
.nav__mail { display: none; }

/* ---------- Media ---------- */
.media { display: block; width: 100%; object-fit: cover; background: #F2F2F2; }
.media--light { outline: 1px solid var(--hair); outline-offset: -1px; background: var(--white); }
.r-card { aspect-ratio: 338 / 222; }
.r-wide { aspect-ratio: 809 / 530; }
.r-small { aspect-ratio: 456 / 299; }
.r-mid { aspect-ratio: 691 / 453; }
.r-hero { aspect-ratio: 926 / 607; }
.r-banner { aspect-ratio: 1440 / 450; }
.r-video { aspect-ratio: 16 / 9; }
.r-square { aspect-ratio: 1 / 1; }
.r-feature { aspect-ratio: 926 / 520; }

.card, .card:hover, .card:focus-visible { display: block; text-decoration: none; }
.card__title { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em; transition: text-decoration-color .3s ease; }
.card:hover .card__title, .card:focus-visible .card__title { text-decoration-color: currentColor; }
.card__media { display: block; overflow: hidden; }
.card__media img { transition: transform .9s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__text { margin-top: 14px; font-size: 20px; line-height: 1.17; }
.card__title { font-weight: 500; }
.cards3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: var(--gap);
	row-gap: 48px;
}
.cards3 .card__text { margin-top: 10px; }
.cases-home { row-gap: 135px; align-items: start; }

/* Hero box on home */
.hero-box { position: relative; aspect-ratio: 926 / 607; background: var(--black); color: var(--white); overflow: hidden; }
.hero-box > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-box__cap { position: absolute; z-index: 1; left: clamp(14px, 2vw, 28px); top: clamp(14px, 2vw, 28px); font-size: clamp(14px, 1.4vw, 20px); }
.hero-box__big { position: absolute; z-index: 1; left: clamp(14px, 2vw, 28px); bottom: clamp(8px, 1.5vw, 24px); font-weight: 500; font-size: clamp(44px, 9.6vw, 140px); line-height: 1; letter-spacing: -1px; }

/* ---------- Rows ---------- */
.rows { border-bottom: 1px solid var(--line); }
.row { padding: 28px 0 80px; border-top: 1px solid var(--line); align-items: start; }
.row--services { padding-bottom: 90px; }
.rows > .grid { padding-left: 0; padding-right: 0; }
.steps { row-gap: 40px; }
.step { grid-column: span 3; border-top: 1px solid var(--line); padding-top: 14px; min-height: 300px; }
.step .t-h3 { margin-top: 100px; }
.step p { margin-top: 14px; }
.approach { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; }
.approach > div { border-top: 1px solid var(--line); padding-top: 14px; }
.approach .t-h3 { margin-top: 60px; }
.approach p { margin-top: 14px; }
.facts { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.fact { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 20px; }
.fact > :first-child { flex: 0 0 200px; font-weight: 500; }
.fact > :last-child { flex: 1 1 200px; }
.arrow-list { list-style: none; margin: 0; padding: 0; }
.arrow-list li::before { content: "→ "; }
.stack-14 > * + * { margin-top: 14px; }
.meta-block { font-size: 20px; line-height: 1.3; }

/* ---------- Case content (block editor) ---------- */
.entry { padding: 0 var(--side); }
.entry > * { margin-top: clamp(60px, 7vw, 100px); }
.entry > *:first-child { margin-top: 0; }
.entry > figure + figure,
.entry > figure + .wp-block-columns,
.entry > .wp-block-columns + figure,
.entry > .wp-block-columns + .wp-block-columns,
.entry > .wp-block-gallery + figure,
.entry > figure + .wp-block-gallery { margin-top: var(--gap); }
.entry > h2, .entry > h3, .entry > .wp-block-heading {
	margin-left: calc((100% + var(--gap)) / 12);
	max-width: calc(50% - 7px);
	font-weight: 500; font-size: clamp(34px, 3.5vw, 50px); line-height: 1.17; letter-spacing: -1px;
	margin-top: clamp(80px, 9vw, 130px);
}
.entry > p, .entry > ul, .entry > ol {
	margin-left: calc((100% + var(--gap)) / 12);
	max-width: calc(50% - 7px);
	font-size: 20px; line-height: 1.3;
}
.entry > h2 + p, .entry > h3 + p, .entry > .wp-block-heading + p { margin-top: 40px; }
.entry > p + p { margin-top: 20px; }
.entry > p.has-large-font-size, .entry > p.is-style-statement {
	max-width: calc(83.333% - 2px);
	font-size: clamp(30px, 3.5vw, 50px); line-height: 1.17; letter-spacing: -1px;
	margin-top: clamp(80px, 9vw, 130px);
}
.entry .wp-block-image, .entry .wp-block-image img { width: 100%; }
.entry .wp-block-image img { height: auto; }
.entry figcaption { margin-top: 10px; font-size: 18px; text-align: left; }
.entry .wp-block-columns { display: flex; gap: var(--gap); margin-bottom: 0; }
.entry .wp-block-column { flex: 1 1 0; min-width: 0; }
.entry .wp-block-column > * + * { margin-top: var(--gap); }
.entry .wp-block-quote {
	margin-left: calc((100% + var(--gap)) / 12);
	max-width: calc(83.333% - 2px);
	border: 0; padding: 0;
	margin-top: clamp(100px, 12vw, 170px);
}
.entry .wp-block-quote p { font-size: clamp(30px, 3.5vw, 50px); line-height: 1.17; letter-spacing: -1px; }
.entry .wp-block-quote cite { display: block; margin-top: 40px; font-style: normal; font-size: 20px; line-height: 1.3; }
.entry .wp-block-video video { width: 100%; }
.entry .wp-block-gallery { display: flex; flex-wrap: wrap; gap: var(--gap); }
.entry .wp-block-separator { border: 0; border-top: 1px solid var(--line); }

/* Generic page text */
.page-text > * + * { margin-top: 20px; }
.page-text h2 { margin-top: 60px; font-size: clamp(30px, 3vw, 40px); letter-spacing: -1px; }

/* ---------- Form ---------- */
.brief { display: flex; flex-direction: column; gap: 36px; font-size: 20px; line-height: 1.3; }
.form2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 36px; }
.brief label { display: flex; flex-direction: column; gap: 8px; }
.brief label > span { font-weight: 500; }
.brief input, .brief textarea, .brief select {
	width: 100%; min-height: 44px;
	border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
	padding: 8px 0; background: transparent;
	font: inherit; letter-spacing: inherit; color: inherit;
	-webkit-appearance: none; appearance: none;
}
.brief select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 4px center; padding-right: 24px;
}
.brief textarea { resize: vertical; min-height: 120px; }
.brief input::placeholder, .brief textarea::placeholder { color: #767676; }
.brief input:focus, .brief textarea:focus, .brief select:focus { outline: none; border-bottom-color: var(--black); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.btn {
	display: inline-flex; align-items: center; min-height: 56px; padding: 0 32px;
	border: 0; background: var(--black); color: var(--white);
	font: inherit; font-weight: 500; font-size: 20px; cursor: pointer;
}
.btn, .btn:hover { text-decoration: none; }
.btn:hover { background: #262626; }
.btn--ghost { background: var(--white); color: var(--black); border: 1px solid var(--black); }
.btn--ghost:hover { background: #F2F2F2; }
.notice { border-top: 1px solid var(--line); padding-top: 28px; }
.notice--error { color: #8A1C1C; }

/* ---------- Questions (accordion) ---------- */
.faq { border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); padding: 24px 0; }
.faq summary {
	list-style: none; cursor: pointer;
	display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
	font-weight: 500; font-size: clamp(22px, 2vw, 28px); line-height: 1.17; letter-spacing: -0.5px; color: var(--black);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 auto; font-weight: 300; font-size: 40px; line-height: .8; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin-top: 18px; max-width: 640px; }

/* ---------- Contact extras ---------- */
.steps--3 .step { grid-column: span 4; min-height: 240px; }
.steps--3 .step p { margin-top: 80px; }
.details__row2 { margin-top: 40px; }
.person { border-top: 1px solid var(--black); padding-top: 14px; }
.brief__send { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.btn--pill { border-radius: 1000px; padding: 0 30px; justify-content: center; }
.t-xs { font-size: 16px; line-height: 1.3; }
.brief input, .brief select { height: 44px; line-height: 1.3; }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(100px, 15vw, 220px) var(--side) var(--gap); font-size: 20px; line-height: 1.17; }
.site-footer.grid { padding-left: var(--side); padding-right: var(--side); }
.site-footer--tight { padding-top: clamp(60px, 8vw, 120px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.grid { display: flex; flex-direction: column; gap: 24px; }
	.grid > * { margin-top: 0 !important; }
	.cards3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.form2, .approach { grid-template-columns: minmax(0, 1fr); }
	.step, .steps--3 .step { min-height: 0; }
	.steps--3 .step p { margin-top: 40px; }
	.step .t-h3, .approach .t-h3 { margin-top: 40px; }
	.row { padding-bottom: 56px; }
	.entry .wp-block-columns { flex-direction: column; }
	.entry > h2, .entry > h3, .entry > .wp-block-heading,
	.entry > p, .entry > ul, .entry > ol, .entry .wp-block-quote { margin-left: 0; max-width: none; }
}
@media (max-width: 700px) {
	.burger { display: inline-flex; }
	.nav { display: none; }
	.site-header.is-open .nav {
		display: flex; flex-direction: column;
		position: fixed; left: 0; right: 0; bottom: 0;
		top: calc(72px + var(--wp-admin--admin-bar--height, 0px)); z-index: 29;
		background: var(--white); padding: 40px var(--side) 24px; overflow-y: auto;
		animation: navin .6s var(--ease-io) both;
	}
	.site-header.is-open .nav ul { flex-direction: column; flex-wrap: nowrap; gap: 0; font-size: 44px; font-weight: 500; line-height: 1.1; letter-spacing: -1px; }
	.site-header.is-open .nav li a { display: block; padding: 10px 0; }
	.site-header.is-open .nav__mail { display: block; margin-top: auto; padding-top: 40px; font-size: 20px; letter-spacing: -0.5px; }
	body.menu-open { overflow: hidden; }
}
@media (max-width: 560px) {
	.cards3 { grid-template-columns: minmax(0, 1fr); }
	.fact > :first-child { flex-basis: 100%; }
}
@media (max-width: 700px) {
	:root { --side: 16px; }
}

/* ---------- Motion ---------- */
/* Blocks fade in one after another while scrolling (and again after scrolling back up). */
.below { opacity: 0; }
.in-view { opacity: 1; transition: opacity 1000ms var(--ease-io); }
/* Loading line at the top and soft page fade-in. */
.pbar {
	position: fixed; top: var(--wp-admin--admin-bar--height, 0px); left: 0; width: 100%; height: 2px;
	background: var(--black); transform-origin: 0 50%; transform: scaleX(0);
	z-index: 60; pointer-events: none;
	animation: pbar 1.2s cubic-bezier(.65, 0, .35, 1) forwards;
}
@keyframes pbar { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.site-header, #content, .site-footer { animation: pagein 1s var(--ease-io) .35s both; }
@keyframes pagein { from { opacity: 0; } to { opacity: 1; } }
@keyframes navin { from { opacity: 0; } to { opacity: 1; } }
img.is-loading { opacity: 0; }
img.is-loaded { opacity: 1; transition: opacity .6s ease; }
body.menu-open .site-header { transform: none; }

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
	.below { opacity: 1; }
	.card__media img, .site-header, .in-view, img.is-loaded, .burger i { transition: none !important; }
	.pbar { display: none; }
	.site-header, #content, .site-footer, .site-header.is-open .nav { animation: none !important; }
}
