/* =========================================================
   Layout primitives — wrap, section, grids
   ========================================================= */

.wrap {
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.wrap-narrow {
	max-width: 1100px;
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: clamp(5rem, 10vw, 9rem);
}

.sec {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 6rem var(--gutter);
}
.sec-head {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: end;
	margin-bottom: 4rem;
}
.sec-head h2 {
	font-weight: 500;
	letter-spacing: -0.04em;
	text-transform: lowercase;
}
.sec-head .side {
	max-width: 42ch;
	color: var(--muted);
	line-height: 1.55;
	font-size: 1.05rem;
}
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; } }

/* Aspect ratios used by placeholder tiles + portfolio cards */
.ar-16-9 { aspect-ratio: 16/9; }
.ar-4-3  { aspect-ratio: 4/3; }
.ar-3-4  { aspect-ratio: 3/4; }
.ar-1-1  { aspect-ratio: 1/1; }
.ar-21-9 { aspect-ratio: 21/9; }
.ar-2-3  { aspect-ratio: 2/3; }
.ar-3-2  { aspect-ratio: 3/2; }

/* Horizontal rule */
.rule { height: 1px; background: var(--hairline); border: 0; margin: 2rem 0; }

/* Focus ring */
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Main column spacing when under header */
#mona-main {
	min-height: 60vh;
}

/* Video wrapper — responsive embeds */
.video-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	background: var(--ink);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.video-wrap iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Vertical reel embed (9:16) — for YouTube Shorts / Instagram Reels / TikTok */
.video-wrap--vertical {
	aspect-ratio: 9/16;
	max-width: 360px;
	margin: 0 auto;
}

/* Click-to-play facade — used on the portfolio single hero so we don't
 * ship the YouTube/Vimeo player JS (~1MB) on first paint. The poster
 * image becomes the LCP element; one click swaps in the real iframe via
 * assets/js/video-facade.js. */
.video-facade {
	cursor: pointer;
}
.video-facade__play {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: var(--ink);
	cursor: pointer;
	display: block;
	overflow: hidden;
	font: inherit;
	color: inherit;
}
.video-facade__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease, filter 0.3s ease;
}
.video-facade__icon {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	color: rgba(0, 0, 0, 0.85);
	display: grid;
	place-items: center;
	pointer-events: none;
	transition: transform 0.25s ease, color 0.2s ease;
	z-index: 2;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}
.video-facade__icon svg {
	display: block;
	width: clamp(56px, 8vw, 84px);
	height: auto;
}
.video-facade__play:hover .video-facade__poster,
.video-facade__play:focus-visible .video-facade__poster {
	transform: scale(1.02);
	filter: brightness(0.85);
}
.video-facade__play:hover .video-facade__icon,
.video-facade__play:focus-visible .video-facade__icon {
	color: rgba(0, 0, 0, 0.95);
	transform: translate(-50%, -50%) scale(1.08);
}
.video-facade__play:focus-visible {
	outline: 3px solid var(--accent, #fff);
	outline-offset: -3px;
}
.video-facade--active iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
@media (prefers-reduced-motion: reduce) {
	.video-facade__poster,
	.video-facade__icon {
		transition: none;
	}
}

/* Square embed (1:1) — for square-format short films (e.g. ADRA) */
.video-wrap--square {
	aspect-ratio: 1/1;
	max-width: 720px;
	margin: 0 auto;
}
