/*
 * Belong — layout styles.
 * Measurements come from the Figma frames: 1440 (desktop), 744 (tablet), 393 (mobile).
 * Desktop uses a 3-column grid (left third is reserved for the fixed header),
 * tablet splits into halves, mobile keeps a 200px header column.
 */

:root {
	--belong-gutter: 4px;
	--belong-hero-h: max(700px, 100svh);
	--belong-lh: 1.07;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

.wp-site-blocks > * + * {
	margin-block-start: 0;
}

.belong-main p,
.belong-main h1,
.belong-main h2,
.belong-main figure {
	margin: 0;
}

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

/* ---------- Header ---------- */

.wp-site-blocks {
	position: relative;
}

.belong-header {
	position: fixed;
	z-index: 50;
	top: 0;
	left: 0;
	height: 100svh;
	padding: var(--belong-gutter);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	pointer-events: none;
}

.belong-header > * {
	pointer-events: auto;
	margin: 0;
}

.belong-logo img {
	display: block;
	width: 117px;
	height: auto;
}

.belong-nav {
	margin-top: 66px;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 15px;
}

.belong-nav.wp-block-navigation,
.belong-nav .wp-block-navigation__container {
	gap: 0;
}

.belong-nav a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.belong-nav a:hover {
	text-decoration: underline;
}

.belong-nav a.current,
.belong-nav .current-menu-item > a {
	color: var(--wp--preset--color--muted);
}

.belong-home-icon {
	margin-top: auto !important;
	padding-bottom: 1px;
}

.belong-home-icon img {
	display: block;
	width: 33px;
	height: auto;
}

.should-invert {
	transition: filter 0.2s ease;
}

.should-invert.is-inverted {
	filter: invert(1) hue-rotate(180deg);
}

/* ---------- Hero ---------- */

.belong-hero {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: auto auto 1fr auto;
	grid-template-areas:
		". intro photo"
		". img   photo"
		". .     photo"
		". title caption";
	height: var(--belong-hero-h);
}

.hero-intro {
	grid-area: intro;
	padding: var(--belong-gutter) var(--belong-gutter) 0;
	max-width: 310px;
}

.hero-img {
	grid-area: img;
	margin: 41px 0 0 var(--belong-gutter) !important;
	width: 296px;
}

.hero-img img {
	width: 100%;
}

.hero-title {
	grid-area: title;
	align-self: end;
	padding: 0 var(--belong-gutter) 4px;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 0.95;
}

.belong-hero .hero-photo {
	grid-area: photo;
	min-height: 0;
	height: 100%;
	overflow: hidden;
}

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

.hero-caption {
	grid-area: caption;
	min-height: 138px;
	box-sizing: border-box;
	padding: var(--belong-gutter);
	background: var(--wp--preset--color--olive);
	max-width: none;
}

/* ---------- Quote strip ---------- */

.belong-quote {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: center;
	min-height: 40px;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--quote);
}

.belong-quote p {
	grid-column: 2 / 4;
	padding: 0 var(--belong-gutter);
}

/* ---------- Mission / Vision ---------- */

.belong-mv {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	padding: 136px 0 146px;
}

.mv-item,
.mv-contact {
	grid-column: 2 / 4;
	display: grid;
	grid-template-columns: subgrid;
}

.mv-item + .mv-item {
	margin-top: 72px;
}

.mv-label {
	grid-column: 1;
	padding: 0 var(--belong-gutter);
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1;
}

.mv-text {
	grid-column: 2;
	padding: 0 var(--belong-gutter) 0 0;
	max-width: 455px;
}

.mv-text.is-narrow {
	max-width: 336px;
}

.mv-text p + p {
	margin-top: 20px;
}

.belong-mv .mv-contact {
	display: block;
	grid-column: 3;
	margin-top: 235px;
	max-width: 240px;
}

/* ---------- Gallery ---------- */

.belong-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: start;
	min-height: 601px;
	background: var(--wp--preset--color--ink);
}

.gallery-row {
	grid-column: 2 / 4;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	width: 799px;
	max-width: 100%;
	padding-left: var(--belong-gutter);
	box-sizing: border-box;
}

.gallery-row figure {
	min-width: 0;
}

/* grow by the intrinsic widths of the source images (381 / 314 / 482) */
.gallery-row .gallery-1 { flex: 381 1 0; }
.gallery-row .gallery-2 { flex: 314 1 0; }
.gallery-row .gallery-3 { flex: 482 1 0; }

.gallery-row img {
	width: 100%;
	aspect-ratio: auto;
}

.gallery-1 img { aspect-ratio: 381 / 546; object-fit: cover; }
.gallery-2 img { aspect-ratio: 314 / 449; object-fit: cover; }
.gallery-3 img { aspect-ratio: 482 / 648; object-fit: cover; }

/* ---------- Find us ---------- */

.belong-gap.wp-block-spacer {
	margin: 0;
}

.belong-find {
	display: grid;
	grid-template-columns: 723fr 717fr;
	height: 494px;
	background: var(--wp--preset--color--olive);
}

.find-text {
	padding: var(--belong-gutter);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1;
}

.belong-find .find-photo {
	height: 100%;
	overflow: hidden;
}

.belong-find .find-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Footer ---------- */

.belong-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--paper-text);
	font-size: var(--wp--preset--font-size--x-small);
}

.belong-footer p {
	margin: 0;
}

/* ---------- Story ---------- */

.belong-story {
	position: relative;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: start;
	align-content: start;
	min-height: calc(100svh - 52px);
}

.story-text {
	grid-column: 2;
	padding: 10px var(--belong-gutter) 0;
}

.belong-main .story-title {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 0.92;
	margin-bottom: 44px;
}

.story-text p {
	max-width: 360px;
}

.belong-main .story-text p + p {
	margin-top: 15px;
}

.belong-main .story-subtitle {
	margin: 43px 0;
	font-size: var(--wp--preset--font-size--xx-large);
}

.belong-main .story-values {
	list-style: none;
	margin: 0;
	padding: 0;
}

.story-strip {
	grid-column: 3;
	margin-top: 91px;
	width: calc(100% - 6px);
	overflow: hidden;
}

.strip-row {
	display: flex;
	align-items: flex-start;
}

.strip-row figure {
	min-width: 0;
}

/* grow by the intrinsic widths of the source images */
.strip-row .strip-1 { flex: 95 1 0; }
.strip-row .strip-2 { flex: 142 1 0; }
.strip-row .strip-3 { flex: 128 1 0; }
.strip-row .strip-4 { flex: 174 1 0; }
.strip-row .strip-5 { flex: 176 1 0; }

.strip-row img { width: 100%; object-fit: cover; }
.strip-1 img { aspect-ratio: 95 / 140; }
.strip-2 img { aspect-ratio: 142 / 204; }
.strip-3 img { aspect-ratio: 128 / 171; }
.strip-4 img { aspect-ratio: 174 / 123; }
.strip-5 img { aspect-ratio: 176 / 171; }

/* vertical note, reads bottom-to-top and dips into the footer */
.belong-main .story-aside {
	position: absolute;
	z-index: 5;
	right: 30px;
	bottom: -30px;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	line-height: 15px;
}

/* ---------- Connect ---------- */

.belong-connect {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: auto auto 1fr auto;
	min-height: calc(100svh - 52px);
	padding-bottom: 31px;
	box-sizing: border-box;
}

.belong-connect > * {
	grid-column: 2;
}

.connect-intro {
	padding: 4px var(--belong-gutter) 0;
	max-width: 300px;
}

.belong-connect .belong-form {
	margin: 44px 0 0 var(--belong-gutter);
	width: 295px;
	max-width: 100%;
}

.belong-main .connect-contact {
	grid-row: 4;
	margin-left: var(--belong-gutter);
	max-width: 250px;
	font-size: var(--wp--preset--font-size--large);
	line-height: 16px;
}

.belong-form {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.belong-form input,
.belong-form textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--field);
	color: var(--wp--preset--color--ink);
	font: inherit;
	line-height: 18px;
}

.belong-form input {
	height: 18px;
}

.belong-form textarea {
	height: 87px;
	resize: vertical;
}

.belong-form ::placeholder {
	color: rgba(22, 22, 22, 0.26);
	opacity: 1;
}

.belong-form input:focus-visible,
.belong-form textarea:focus-visible {
	outline: 1px solid var(--wp--preset--color--contrast);
	outline-offset: 0;
}

.belong-form button {
	align-self: flex-start;
	margin-top: 46px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font: inherit;
	cursor: pointer;
}

.belong-form button:hover,
.belong-form button:focus-visible {
	text-decoration: underline;
}

.belong-main .belong-form__status {
	margin-top: 12px;
}

.belong-form__status.is-sent {
	color: var(--wp--preset--color--contrast);
}

.belong-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

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

/* ---------- Generic pages ---------- */

.belong-index {
	min-height: 100svh;
	padding: 4px 4px 80px calc(100% / 3);
	box-sizing: border-box;
}

/* ---------- Tablet: 601–1024 ---------- */

@media (max-width: 1024px) {
	:root {
		--belong-hero-h: 810px;
	}

	.belong-header {
		position: absolute;
		height: var(--belong-hero-h);
	}

	/* inner pages: home icon sits at the bottom of the page */
	body:not(.home) .belong-header {
		height: auto;
		bottom: 0;
	}

	.belong-story {
		grid-template-columns: 1fr 1fr;
		min-height: calc(100svh - 43px);
	}

	.story-text,
	.story-strip {
		grid-column: 2;
	}

	.story-text {
		padding: 8px 3px 0;
	}

	.belong-main .story-title {
		margin-bottom: 26px;
	}

	.belong-main .story-text p + p {
		margin-top: 24px;
	}

	.belong-main .story-subtitle {
		margin: 22px 0;
	}

	.story-strip {
		margin: 40px 0 0 3px;
		width: calc(100% - 9px);
	}

	.belong-main .story-aside {
		right: 19px;
		bottom: -21px;
	}

	.belong-footer {
		min-height: 43px;
	}

	.belong-connect {
		grid-template-columns: 1fr 1fr;
		min-height: calc(100svh - 43px);
		padding-bottom: 79px;
	}

	.connect-intro {
		padding: 8px 3px 0;
		max-width: 360px;
	}

	.belong-connect .belong-form,
	.belong-main .connect-contact {
		margin-left: 3px;
	}

	.belong-connect .belong-form {
		margin-top: 44px;
	}

	.belong-hero {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto 1fr auto auto;
		grid-template-areas:
			".     intro"
			".     img"
			".     ."
			"title photo"
			".     caption";
	}

	.hero-intro {
		padding-left: 3px;
		max-width: 340px;
	}

	.hero-img {
		margin: 30px 0 0 3px !important;
		width: 132px;
	}

	.belong-hero .hero-photo {
		height: 349px;
	}

	.hero-caption {
		min-height: 110px;
		padding-left: 3px;
	}

	.belong-quote,
	.belong-mv,
	.belong-gallery {
		grid-template-columns: 1fr 1fr;
	}

	.belong-quote p {
		grid-column: 1 / -1;
	}

	.belong-mv {
		padding: 92px 0 81px;
	}

	.mv-item {
		grid-column: 1 / -1;
	}

	.mv-item + .mv-item {
		margin-top: 98px;
	}

	.mv-label {
		grid-column: 1;
	}

	.mv-text,
	.mv-text.is-narrow {
		grid-column: 2;
		padding-left: 3px;
		max-width: 360px;
	}

	.belong-mv .mv-contact {
		grid-column: 2;
		margin-top: 43px;
		padding-left: 3px;
		max-width: 360px;
	}

	.belong-gallery {
		min-height: 810px;
		padding: 16px 6px 0;
	}

	.gallery-row {
		grid-column: 1 / -1;
		width: 100%;
		padding-left: 0;
	}

	.belong-find {
		grid-template-columns: 1fr;
		grid-template-rows: 369px 369px;
		height: auto;
	}

	.belong-index {
		padding-left: 50%;
	}
}

/* ---------- Mobile: ≤600 ---------- */

@media (max-width: 600px) {
	:root {
		--belong-hero-h: 698px;
	}

	.belong-main,
	.belong-nav {
		font-size: var(--wp--preset--font-size--small);
	}

	.belong-nav {
		line-height: 13px;
	}

	.belong-logo img {
		width: 97px;
	}

	.belong-nav {
		margin-top: 58px;
	}

	.belong-hero {
		grid-template-columns: 200px 1fr;
		grid-template-rows: auto auto auto 1fr auto auto;
		grid-template-areas:
			". intro"
			". img"
			". title"
			". ."
			". photo"
			". caption";
	}

	.hero-intro {
		padding: var(--belong-gutter) var(--belong-gutter) 0 0;
	}

	.hero-img {
		margin: 24px 0 0 0 !important;
		width: 94px;
	}

	.hero-title {
		align-self: start;
		margin-top: 22px;
		padding: 0 var(--belong-gutter) 0 0;
		font-size: 17px;
	}

	.belong-hero .hero-photo {
		height: 231px;
	}

	.hero-caption {
		min-height: 116px;
		padding: var(--belong-gutter) var(--belong-gutter) var(--belong-gutter) 0;
	}

	.belong-quote {
		padding: 5px 0;
		box-sizing: border-box;
	}

	.belong-mv {
		grid-template-columns: 1fr;
		padding: 62px 0 110px;
	}

	.mv-item {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.mv-item + .mv-item {
		margin-top: 60px;
	}

	.mv-label,
	.mv-text,
	.mv-text.is-narrow,
	.belong-mv .mv-contact {
		grid-column: 1;
		padding: 0 var(--belong-gutter);
		max-width: none;
		font-size: inherit;
	}

	.mv-label {
		font-size: var(--wp--preset--font-size--x-large);
	}

	.belong-mv .mv-contact {
		margin-top: 40px;
	}

	.belong-gallery {
		min-height: 586px;
		padding: 14px 6px 0;
	}

	.gallery-row {
		gap: 5px;
	}

	.belong-find {
		grid-template-rows: 306px 369px;
	}

	.belong-index {
		padding-left: 200px;
	}

	.belong-story {
		grid-template-columns: 200px 1fr;
		min-height: calc(100svh - 52px);
	}

	.story-text {
		padding: 6px var(--belong-gutter) 0 0;
	}

	.belong-main .story-title {
		font-size: 17px;
		margin-bottom: 17px;
	}

	.story-text p {
		max-width: 175px;
	}

	.belong-main .story-text p + p {
		margin-top: 10px;
	}

	.belong-main .story-subtitle {
		margin: 18px 0 12px;
		font-size: 17px;
	}

	.story-strip {
		margin: 30px 0 0;
		width: calc(100% - 6px);
	}

	.strip-row {
		width: 363px;
	}

	.belong-main .story-aside {
		right: 13px;
		bottom: -39px;
		line-height: 13px;
	}

	.belong-footer {
		min-height: 52px;
	}

	.belong-connect {
		grid-template-columns: 200px 1fr;
		min-height: calc(100svh - 52px);
		padding-bottom: 138px;
	}

	.connect-intro {
		padding: 6px var(--belong-gutter) 0 0;
		max-width: 187px;
	}

	.belong-connect .belong-form,
	.belong-main .connect-contact {
		margin-left: 0;
	}

	.belong-connect .belong-form {
		margin-top: 38px;
		width: calc(100% - 6px);
	}

	.belong-main .connect-contact {
		font-size: var(--wp--preset--font-size--small);
		line-height: 13px;
		max-width: 187px;
	}
}
