/*
Theme Name: Marcello — Filmes & Autor
Theme URI: https://marcellosampaio.com/
Author: Marcello Sampaio
Description: Portfólio artístico editorial, com navegação lateral, mosaico automático e blog de leitura aberta.
Version: 3.0.2
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: marcello-riff
*/

:root {
	--ms-white: #fff;
	--ms-black: #050505;
	--ms-grey: #404047;
	--ms-light: #d8d8d8;
	--ms-red: #ef101c;
	--ms-rail: clamp(210px, 14.9vw, 450px);
	--ms-gap: clamp(10px, .95vw, 28px);
	--ms-sans: Arial, Helvetica, sans-serif;
	--ms-script: "Brush Script MT", "Segoe Script", "URW Chancery L", cursive;
}

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

html {
	scroll-behavior: smooth;
}

body {
	background: var(--ms-white);
	color: var(--ms-black);
	font-family: var(--ms-sans);
	font-size: 16px;
	line-height: 1.35;
	margin: 0;
	text-rendering: optimizeLegibility;
}

body.admin-bar .ms-rail {
	height: calc(100vh - 32px);
	top: 32px;
}

img,
video,
iframe {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
textarea,
select {
	font: inherit;
}

::selection {
	background: var(--ms-red);
	color: #fff;
}

.screen-reader-text,
.skip-link:not(:focus) {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.skip-link:focus {
	background: #fff;
	border: 2px solid #000;
	left: 12px;
	padding: 8px 12px;
	position: fixed;
	top: 12px;
	z-index: 999;
}

.ms-site {
	min-height: 100vh;
}

/* Fixed left column: the page's visual spine. */
.ms-rail {
	background: #fff;
	display: flex;
	flex-direction: column;
	height: 100vh;
	left: 0;
	overflow-y: auto;
	padding: 0 clamp(14px, 1.25vw, 27px) 18px;
	position: fixed;
	top: 0;
	width: var(--ms-rail);
	z-index: 30;
}

.ms-rail-portrait {
	aspect-ratio: .91;
	background: #111;
	margin: clamp(6px, .45vw, 13px) calc(-1 * clamp(14px, 1.25vw, 27px)) 0;
	overflow: hidden;
}

.ms-rail-portrait img {
	height: 100%;
	object-fit: cover;
	object-position: 50% 48%;
	width: 100%;
}

.ms-brand {
	display: block;
	padding: clamp(14px, 1.5vw, 30px) 0 clamp(20px, 1.7vw, 34px);
}

.ms-brand-mark {
	display: block;
	font-family: var(--ms-script);
	font-size: clamp(38px, 3vw, 86px);
	font-style: italic;
	font-weight: 500;
	letter-spacing: -.09em;
	line-height: .7;
	text-transform: lowercase;
}

.ms-brand-sub {
	display: none;
}

.ms-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ms-nav li {
	border-top: 1px solid #111;
}

.ms-nav li:last-child {
	border-bottom: 1px solid #111;
}

.ms-nav a {
	display: block;
	font-size: clamp(12px, .95vw, 27px);
	font-weight: 400;
	letter-spacing: -.035em;
	line-height: 1.05;
	padding: clamp(8px, .75vw, 16px) 0;
	text-transform: uppercase;
	transition: color .12s, padding .12s;
}

.ms-nav a:hover,
.ms-nav a:focus-visible,
.ms-nav .current-menu-item > a {
	color: var(--ms-red);
	padding-left: 5px;
}

.ms-rail-bottom {
	margin-top: auto;
	padding-top: 20px;
}

.ms-socials {
	display: flex;
	font-size: 12px;
	font-weight: 700;
	gap: 14px;
	margin-bottom: 14px;
}

.ms-socials a {
	border: 2px solid #000;
	border-radius: 50%;
	height: 25px;
	overflow: hidden;
	padding: 3px 0;
	text-align: center;
	width: 25px;
}

.ms-socials a:first-child {
	font-size: 0;
}

.ms-socials a:first-child::after {
	content: "IG";
	font-size: 10px;
}

.ms-socials a:last-child {
	font-size: 0;
}

.ms-socials a:last-child::after {
	content: "in";
	font-size: 11px;
}

.ms-rail-cta {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.ms-rail-cta span:last-child {
	display: none;
}

.ms-rail-cta::after {
	content: "  |  BR";
	font-weight: 400;
}

.ms-main {
	margin-left: var(--ms-rail);
	min-height: 100vh;
}

/* Open logo strip, without boxes, matching the reference composition. */
.ms-client-strip {
	align-items: center;
	background: #fff;
	display: grid;
	gap: clamp(16px, 2vw, 54px);
	grid-template-columns: repeat(8, minmax(70px, 1fr));
	height: clamp(104px, 7.7vw, 160px);
	overflow: hidden;
	padding: clamp(30px, 2.2vw, 54px) clamp(14px, 1.3vw, 30px) 8px;
	position: relative;
}

.ms-client-title {
	font-size: clamp(12px, .75vw, 22px);
	left: 50%;
	position: absolute;
	text-align: center;
	top: clamp(8px, .6vw, 18px);
	transform: translateX(-50%);
	white-space: nowrap;
}

.ms-client-title strong {
	font-weight: 400;
}

.ms-client-title strong::after {
	content: " Atendidos";
}

.ms-client-title span {
	display: none;
}

.ms-client-logo {
	align-items: center;
	display: flex;
	justify-content: center;
	min-width: 0;
}

.ms-client-logo img {
	filter: brightness(0);
	max-height: clamp(24px, 2.35vw, 54px);
	max-width: clamp(62px, 6.5vw, 150px);
	object-fit: contain;
	width: auto;
}

.ms-client-word {
	font-family: Georgia, serif;
	font-size: clamp(17px, 1.5vw, 38px);
	font-style: italic;
	font-weight: 800;
	letter-spacing: -.06em;
}

.ms-content {
	padding: 0 var(--ms-gap) clamp(60px, 6vw, 150px);
}

.home .ms-content,
.page-template-page-portfolio .ms-content {
	padding-top: var(--ms-gap);
}

/* Home is the mosaic: no promotional hero before the work. */
.ms-home > .ms-home-opening {
	display: none;
}

.ms-home > .ms-portfolio-grid {
	margin-top: 0;
}

.ms-portfolio-grid {
	display: grid;
	gap: var(--ms-gap);
	grid-auto-flow: dense;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
}

.ms-work-card,
.ms-work-card.is-wide {
	background: #111;
	grid-column: auto;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	position: relative;
}

.ms-work-card > a {
	display: block;
	height: 100%;
	position: relative;
}

.ms-work-media,
.ms-work-card.is-wide .ms-work-media {
	aspect-ratio: 4 / 5;
	background: #111;
	overflow: hidden;
	position: relative;
}

.ms-work-media img {
	height: 100%;
	object-fit: cover;
	transform: scale(1.002);
	transition: filter .22s, transform .5s cubic-bezier(.22, .7, .22, 1);
	width: 100%;
}

.ms-work-media::after {
	background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .78));
	content: "";
	inset: 0;
	opacity: 0;
	position: absolute;
	transition: opacity .2s;
}

.ms-work-play {
	border-color: transparent transparent transparent #fff;
	border-style: solid;
	border-width: 7px 0 7px 11px;
	bottom: 18px;
	color: transparent;
	height: 0;
	left: 18px;
	opacity: 0;
	position: absolute;
	transition: opacity .2s, transform .2s;
	width: 0;
	z-index: 3;
}

.ms-work-copy {
	bottom: 0;
	color: #fff;
	left: 0;
	opacity: 0;
	padding: 18px 18px 17px 44px;
	position: absolute;
	right: 0;
	transform: translateY(6px);
	transition: opacity .2s, transform .2s;
	z-index: 2;
}

.ms-work-client {
	display: block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .08em;
	margin-bottom: 3px;
	text-transform: uppercase;
}

.ms-work-copy h2 {
	font-size: clamp(17px, 1.35vw, 34px);
	font-weight: 700;
	letter-spacing: -.04em;
	line-height: .95;
	margin: 0;
	text-transform: uppercase;
}

.ms-work-copy p {
	font-size: 9px;
	letter-spacing: .04em;
	margin: 6px 0 0;
	text-transform: uppercase;
}

.ms-work-card a:hover .ms-work-media img,
.ms-work-card a:focus-visible .ms-work-media img {
	filter: saturate(1.08) contrast(1.05);
	transform: scale(1.035);
}

.ms-work-card a:hover .ms-work-media::after,
.ms-work-card a:focus-visible .ms-work-media::after,
.ms-work-card a:hover .ms-work-play,
.ms-work-card a:focus-visible .ms-work-play,
.ms-work-card a:hover .ms-work-copy,
.ms-work-card a:focus-visible .ms-work-copy {
	opacity: 1;
	transform: none;
}

.ms-author-band,
.ms-journal-promo {
	display: none;
}

/* Page headings remain compact and subordinate to imagery. */
.ms-page-opening {
	align-items: end;
	border-bottom: 1px solid #111;
	display: grid;
	gap: 30px;
	grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
	margin: 0 0 var(--ms-gap);
	padding: clamp(24px, 2.5vw, 55px) 0 clamp(18px, 1.7vw, 34px);
}

.ms-kicker {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	margin: 0 0 9px;
	text-transform: uppercase;
}

.ms-page-opening h1,
.ms-single-title {
	font-size: clamp(42px, 5vw, 106px);
	font-weight: 500;
	letter-spacing: -.065em;
	line-height: .85;
	margin: 0;
}

.ms-page-opening p {
	font-size: clamp(16px, 1.15vw, 27px);
	margin: 0;
	max-width: 720px;
}

.ms-text-link {
	border-bottom: 1px solid #111;
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	padding-bottom: 4px;
	text-transform: uppercase;
}

.ms-text-link:hover,
.ms-text-link:focus-visible {
	color: var(--ms-red);
}

.ms-page-content {
	max-width: 980px;
	padding-top: clamp(28px, 3vw, 66px);
}

.ms-page-content h1,
.ms-page-content h2,
.ms-page-content h3 {
	font-weight: 500;
	letter-spacing: -.05em;
	line-height: .95;
}

.ms-page-content h1 {
	font-size: clamp(44px, 5vw, 104px);
}

.ms-page-content h2 {
	font-size: clamp(30px, 3.4vw, 70px);
	margin-top: 1.4em;
}

.ms-page-content h3 {
	font-size: clamp(23px, 2.5vw, 46px);
}

.ms-page-content p,
.ms-page-content li {
	font-size: clamp(17px, 1.15vw, 25px);
	line-height: 1.55;
}

.ms-page-content a,
.ms-post-content a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* Project: text column beside the black player, echoing the reference editorial spread. */
.ms-single-project {
	padding-top: var(--ms-gap);
}

.ms-single-head {
	display: grid;
	gap: var(--ms-gap);
	grid-template-columns: minmax(250px, .63fr) minmax(0, 1.37fr);
	margin-bottom: var(--ms-gap);
}

.ms-single-head > div {
	align-self: end;
}

.ms-single-deck {
	border-top: 1px solid #111;
	padding-top: 13px;
}

.ms-single-deck p {
	font-size: clamp(17px, 1.3vw, 28px);
	margin: 0 0 17px;
	max-width: 720px;
}

.ms-video-frame {
	aspect-ratio: 16 / 9;
	background: #000;
	margin: 0 0 clamp(30px, 3vw, 65px);
	width: 100%;
}

.ms-video-frame iframe {
	border: 0;
	height: 100%;
	width: 100%;
}

.ms-single-body {
	display: grid;
	gap: var(--ms-gap);
	grid-template-columns: minmax(250px, .63fr) minmax(0, 1.37fr);
}

.ms-credits {
	border-top: 1px solid #111;
	margin: 0;
}

.ms-credits div {
	border-bottom: 1px solid #111;
	padding: 10px 0;
}

.ms-credits dt {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
}

.ms-credits dd {
	font-size: 14px;
	margin: 2px 0 0;
}

.ms-single-body .ms-page-content {
	max-width: 760px;
	padding-top: 0;
}

.ms-project-nav {
	border-top: 1px solid #111;
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin-top: clamp(55px, 6vw, 130px);
}

.ms-project-nav a {
	display: block;
	font-size: clamp(21px, 2.2vw, 48px);
	letter-spacing: -.04em;
	min-height: 120px;
	padding: 20px 0;
}

.ms-project-nav div:last-child {
	border-left: 1px solid #111;
	padding-left: 20px;
	text-align: right;
}

.ms-project-nav span {
	display: block;
	font-size: 9px;
	letter-spacing: .08em;
	margin-bottom: 15px;
	text-transform: uppercase;
}

/* Open journal: title/context at left, entire post at right. */
.ms-blog-head {
	border-bottom: 1px solid #111;
	display: grid;
	gap: var(--ms-gap);
	grid-template-columns: minmax(240px, .55fr) minmax(0, 1.45fr);
	padding: clamp(24px, 2.4vw, 54px) 0;
}

.ms-blog-head .ms-kicker {
	grid-column: 1;
}

.ms-blog-head h1 {
	font-size: clamp(38px, 4vw, 88px);
	font-weight: 500;
	letter-spacing: -.06em;
	line-height: .9;
	margin: 0;
}

.ms-blog-head p:last-child {
	font-size: clamp(16px, 1.1vw, 24px);
	margin: 0;
	max-width: 700px;
}

.ms-journal {
	max-width: none;
}

.ms-post {
	border-bottom: 1px solid #111;
	display: grid;
	gap: 0 var(--ms-gap);
	grid-template-columns: minmax(240px, .55fr) minmax(0, 1.45fr);
	grid-template-rows: auto 1fr;
	padding: clamp(30px, 3.4vw, 78px) 0;
}

.ms-post-meta {
	font-size: 10px;
	font-weight: 700;
	grid-column: 1;
	letter-spacing: .06em;
	margin: 0 0 11px;
	text-transform: uppercase;
}

.ms-post h2,
.ms-post h1 {
	font-size: clamp(29px, 3vw, 64px);
	font-weight: 500;
	grid-column: 1;
	letter-spacing: -.055em;
	line-height: .94;
	margin: 0;
}

.ms-post h2 a:hover {
	color: var(--ms-red);
}

.ms-post-content {
	font-family: var(--ms-sans);
	font-size: clamp(17px, 1.05vw, 23px);
	grid-column: 2;
	grid-row: 1 / span 2;
	line-height: 1.55;
	max-width: 900px;
}

.ms-post-content > :first-child {
	margin-top: 0;
}

.ms-post-content h2,
.ms-post-content h3,
.ms-post-content h4 {
	font-weight: 600;
	letter-spacing: -.035em;
	line-height: 1.05;
	margin: 1.6em 0 .55em;
}

.ms-post-content h2 {
	font-size: clamp(28px, 3vw, 60px);
}

.ms-post-content h3 {
	font-size: clamp(22px, 2.3vw, 44px);
}

.ms-post-content blockquote {
	border-left: 4px solid #111;
	font-size: 1.2em;
	margin: 1.6em 0;
	padding-left: 20px;
}

.ms-post-content img {
	height: auto;
	margin: 1.4em 0;
}

.ms-post-content iframe {
	aspect-ratio: 16 / 9;
	height: auto;
	width: 100%;
}

.ms-post-single {
	padding-top: clamp(32px, 3.5vw, 80px);
}

.ms-feed-nav {
	margin-top: 20px;
}

.ms-feed-nav .nav-links {
	display: flex;
	gap: 8px;
}

.ms-feed-nav a,
.ms-feed-nav span {
	border: 1px solid #111;
	font-size: 11px;
	padding: 8px 11px;
}

.ms-feed-nav .current {
	background: #000;
	color: #fff;
}

.ms-inf-sentinel {
	align-items: center;
	display: flex;
	font-size: 10px;
	font-weight: 700;
	justify-content: center;
	letter-spacing: .08em;
	min-height: 90px;
	text-transform: uppercase;
}

.ms-inf-sentinel.is-loading::before {
	animation: ms-spin .7s linear infinite;
	border: 2px solid #000;
	border-right-color: transparent;
	border-radius: 50%;
	content: "";
	height: 14px;
	margin-right: 9px;
	width: 14px;
}

@keyframes ms-spin {
	to { transform: rotate(360deg); }
}

.ms-footer {
	border-top: 1px solid #111;
	display: grid;
	gap: 24px;
	grid-template-columns: 1fr auto auto;
	margin: 60px var(--ms-gap) 0;
	padding: 26px 0;
}

.ms-footer strong {
	font-size: 18px;
	font-weight: 600;
}

.ms-footer p {
	font-size: 10px;
	margin: 4px 0 0;
	text-transform: uppercase;
}

.ms-footer nav {
	align-items: center;
	display: flex;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
}

.ms-footer ul {
	display: flex;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ms-footer a:hover {
	color: var(--ms-red);
}

.ms-grid-block-placeholder {
	background: #f4f4f4;
	border: 1px dashed #777;
	padding: 28px;
	text-align: center;
}

.ms-grid-block-placeholder .dashicons {
	display: block;
	font-size: 30px;
	height: 30px;
	margin: 0 auto 8px;
	width: 30px;
}

@media (max-width: 1250px) {
	:root {
		--ms-rail: 210px;
	}

	.ms-client-strip {
		gap: 24px;
		grid-template-columns: repeat(8, 100px);
		overflow-x: auto;
	}

	.ms-portfolio-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	body.admin-bar .ms-rail {
		height: auto;
		top: 46px;
	}

	.ms-rail {
		border-bottom: 1px solid #111;
		display: grid;
		grid-template-columns: auto 1fr;
		height: auto;
		overflow: visible;
		padding: 10px 14px;
		position: sticky;
		width: 100%;
	}

	.ms-rail-portrait,
	.ms-brand-sub,
	.ms-rail-bottom {
		display: none;
	}

	.ms-brand {
	padding: 0 16px 0 0;
	}

	.ms-brand-mark {
	font-size: 29px;
	line-height: .75;
	white-space: nowrap;
	}

	.ms-nav ul {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	}

	.ms-nav li,
	.ms-nav li:last-child {
	border: 0;
	}

	.ms-nav a {
	font-size: 10px;
	letter-spacing: .03em;
	padding: 8px 0;
	white-space: nowrap;
	}

	.ms-main {
		margin-left: 0;
	}

	.ms-client-strip {
		height: 86px;
		padding-top: 30px;
	}

	.ms-portfolio-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ms-work-copy,
	.ms-work-play,
	.ms-work-media::after {
		opacity: 1;
		transform: none;
	}

	.ms-page-opening,
	.ms-single-head,
	.ms-single-body,
	.ms-blog-head,
	.ms-post {
		grid-template-columns: 1fr;
	}

	.ms-post-content {
		grid-column: 1;
		grid-row: auto;
		margin-top: 25px;
	}
}

@media (max-width: 520px) {
	:root {
		--ms-gap: 10px;
	}

	.ms-rail {
		grid-template-columns: 1fr;
	}

	.ms-nav ul {
		width: calc(100vw - 28px);
	}

	.ms-client-strip {
		grid-template-columns: repeat(8, 84px);
	}

	.ms-client-logo img {
		max-height: 23px;
		max-width: 66px;
	}

	.ms-portfolio-grid {
		grid-template-columns: 1fr;
	}

	.ms-work-media,
	.ms-work-card.is-wide .ms-work-media {
		aspect-ratio: 4 / 5;
	}

	.ms-page-opening {
		grid-template-columns: 1fr;
	}

	.ms-footer {
		grid-template-columns: 1fr;
	}

	.ms-footer ul {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}
