/*
Theme Name: Sabbir3D
Description: Portfolio theme rebuilt from the original sabbir3d.uk Squarespace design.
Version: 1.0.1
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: sabbir3d
*/

:root {
	--ink: #000;
	--paper: #fff;
	--serif: "EB Garamond", Garamond, "Times New Roman", serif;
	--display: "Cormorant Garamond", "EB Garamond", Garamond, serif;
	--gutter: 4vw;
	--max: 1500px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.192rem; /* 19.07px */
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; margin: 0 0 .6em; }
h2 { font-size: 2.728rem; line-height: 1.3; }   /* 43.6px */
h3 { font-size: 2.152rem; line-height: 1.33; }  /* 34.4px */
h4 { font-size: 1.192rem; line-height: 1.4; }   /* 19px */
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 576px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { padding: 2.2vw 0; }
.site-header .wrap { display: flex; align-items: center; gap: 2rem; min-height: 65px; }
.site-title { font-family: var(--display); font-size: 1.96rem; line-height: 1; text-decoration: none; margin-right: .5rem; }
.site-nav ul { display: flex; gap: .85rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
	text-decoration: none; padding: .1em 0;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	transition: background-size .3s ease;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a,
.site-nav .current_page_item > a { background-size: 100% 1px; }
.site-social { margin-left: auto; display: flex; gap: 1rem; }
.site-social a { display: block; width: 20px; height: 20px; }
.site-social svg { width: 20px; height: 20px; fill: currentColor; }
.menu-toggle { display: none; }

/* ---------- Work grid (home) ---------- */
.work-grid {
	display: grid; grid-template-columns: repeat(2, 1fr);
	gap: 65px 90px; padding: 42px var(--gutter) 0;
	max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto;
}
.work-item { text-decoration: none; display: block; }
.work-item .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: #f2f2f2; }
.work-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s ease; }
.work-item:hover img { opacity: .85; }
.work-item .work-title { font-family: var(--display); font-size: 1.192rem; line-height: 1.4; margin-top: 15px; }

.home-intro { padding: 42px 0 80px; }
.home-intro h3 a { text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }

/* ---------- Generic page ---------- */
.page-body { padding: 42px 0 80px; }
.page-body > .wrap > * { max-width: 576px; }
.page-body .wp-block-columns { gap: 60px; margin: 2rem 0; }
.page-body .wp-block-columns .wp-block-column { flex: 0 0 282px; }

/* ---------- Project (single) ---------- */
.project { padding: 50px 0 40px; }
.project .entry > .wp-block-heading,
.project .entry > p { max-width: 576px; }
.project .entry > h4 { max-width: 576px; margin-bottom: 3rem; }
.project .entry .wp-block-image { margin: 0 0 38px; }
.project .entry .wp-block-image img { width: 100%; }
.project .entry > .project-intro, .project .entry > .project-outro { max-width: 576px; }
.project .entry .wp-block-group.project-gallery { margin: 3rem 0; }
.project .entry .wp-block-embed { margin: 0 0 38px; }

.pager { display: flex; justify-content: space-between; gap: 2rem; padding: 40px 0 10px; }
.pager a { text-decoration: none; display: inline-flex; align-items: center; gap: .6em; }
.pager a:hover span { text-decoration: underline; text-underline-offset: .15em; }
.pager .next { margin-left: auto; text-align: right; }
.pager svg { width: 22px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.3; }

/* ---------- Contact form ---------- */
.s3d-form { max-width: 576px; margin: 2rem 0 3rem; }
.s3d-form fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.s3d-form legend { padding: 0; margin-bottom: 4px; }
.s3d-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.s3d-form label { display: block; margin-bottom: 22px; }
.s3d-form .row label { margin-bottom: 0; }
.s3d-form .cap { display: block; font-size: .85em; }
.s3d-form .req { opacity: .6; margin-left: .25em; }
.s3d-form input, .s3d-form textarea {
	display: block; width: 100%; font: inherit; color: inherit; background: transparent;
	border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 5px 0;
}
.s3d-form textarea { min-height: 100px; resize: vertical; }
.s3d-form input:focus, .s3d-form textarea:focus { outline: none; border-bottom-width: 2px; }
.s3d-form .hp { position: absolute; left: -9999px; }
.s3d-form button {
	font-family: var(--display); font-size: 1rem; color: var(--ink); background: transparent;
	border: 2px solid var(--ink); border-radius: 0; padding: 20.8px 34.7px; cursor: pointer;
	transition: background .2s, color .2s;
}
.s3d-form button:hover { background: var(--ink); color: var(--paper); }
.s3d-notice { max-width: 576px; padding: 1rem 0; font-family: var(--display); font-size: 1.4rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 70px; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	:root { --gutter: 6vw; }
	body { font-size: 1.05rem; }
	h2 { font-size: 2rem; }
	h3 { font-size: 1.6rem; }
	.site-header .wrap { min-height: 64px; }
	.menu-toggle {
		display: block; margin-left: auto; background: none; border: 0; padding: 8px 0; cursor: pointer; width: 30px;
	}
	.menu-toggle span { display: block; height: 1px; background: var(--ink); margin: 7px 0; transition: transform .3s, opacity .3s; }
	.site-nav, .site-social { display: none; }
	body.menu-open { overflow: hidden; }
	body.menu-open .site-nav {
		display: flex; position: fixed; inset: 64px 0 0; background: var(--paper); z-index: 50;
		align-items: center; justify-content: center;
	}
	body.menu-open .site-nav ul { flex-direction: column; align-items: center; gap: 1.2rem; font-size: 2rem; font-family: var(--display); }
	body.menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
	body.menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
	.work-grid { grid-template-columns: 1fr; gap: 40px; }
	.page-body .wp-block-columns .wp-block-column { flex-basis: 100%; }
	.s3d-form .row { grid-template-columns: 1fr; gap: 22px; }
	.pager { flex-direction: column; }
}
