/* Background color of the website */
body {
	background-color: #020202;
	margin: 0;
}

/* Overall header container on the page */
.navbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	pointer-events: none;
}

/* Container for .name and .nav-links that controls the position/alignment of the title and links */
.navbar-inner {
	pointer-events: auto;
	display: flex;
	align-items: center;
	padding: 1rem 3rem;
	position: relative;
	z-index: 21;
	gap: 2rem;
}

/* Full name in the top left of the header */
.name {
	font-size: 1.8rem;
	font-weight: 600;
	font-family: 'Antonio', Helvetica, Arial, sans-serif;
	color: #fff;
	letter-spacing: .08em;
}

/* Navbar text spacing */
.nav-links {
	display: flex;
	gap: 1rem;
	position: relative;
}

/* Navbar text formatting */
.nav-links a {
	text-decoration: none;
	font-size: 1.1rem;
	display: inline-flex;
	align-items: center;
	font-family: 'Antonio', Helvetica, Arial, sans-serif;
	font-weight: 100;
	color: #fff;
	padding: 0.25em 0.6em;
	position: relative;
	z-index: 2;
	letter-spacing: .15em;
}

/* Navbar hover formatting */
.nav-hover-box {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 0;
	background: white;
	border-radius: 6px;
	z-index: 0;
	transition:
		height 0.2s ease-out,
		opacity 0.15s ease-out;
	pointer-events: none;
	opacity: 0;
}

/* Makes the text black on hover so it's visible against the white hover box */
.nav-links a:hover {
	color: black;
}

/* Focus-visible styling for nav links; doesn't interfere with the hover animation, but matches the hover box radius */
.nav-links a:focus-visible {
	outline: 2px solid #41DAF2;
	outline-offset: 4px;
	border-radius: 6px;
}

/* The black bar behind the name and navbar, with a gradient that fades the opacity out at the bottom; fades out when scrolling down, and in when scrolling up to the top of the page */
.titlebar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 125px;
	background: linear-gradient(to bottom,
			rgba(0, 0, 0, 1) 0px,
			rgba(0, 0, 0, 1) 1px,
			rgba(0, 0, 0, 0) 100px);
	z-index: 999;
}

/* The black bar behind the name and navbar, solid black; fades in when scrolling down, and out when scrolling up to the top of the page */
.titlebar-solid {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 75px;
	background: rgba(0, 0, 0, 1);
	z-index: 999;
	opacity: 0;
	/* Initialized hidden so gradient bar shows on first load */
	transition: opacity 0.2s ease;
}

/* Hero section; the reel thumbnail and play button */
.hero {
	position: relative;
	width: 100%;
	overflow: hidden;
}

/* Hero image controls (the thumbnail for the reel) */
.hero img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* The fade transition to the solid black background */
.hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 25%;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 100%);
	pointer-events: none;
}

/* Footer text: copyright + name */
footer {
	padding: 6rem;
	text-align: center;
	color: #fff;
	font-family: 'Antonio', Helvetica, Arial, sans-serif;
	font-weight: 200;
	letter-spacing: .25em;
}

/* Play button style and position */
.text-play {
	position: absolute;
	bottom: 34%;
	transform: translateX(-50%);
	text-align: left;
	left: 9%;
	font-size: 2.4rem;
	font-weight: 400;
	font-family: 'Sarala', Helvetica, Arial, sans-serif;
	margin-top: 30px;
	padding: 0em .4em 0em 0.5em;
	background: white;
	border: none;
	/* Removes the default stroke/border */
	outline: none;
	/* Removes the focus ring/extra shadow */
	border-radius: 12px;
	cursor: pointer;
	/* Layout */
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

/* Play button invert on hover */
.text-play:hover {
	background: black;
	color: white;
}

/* Play button focus-visible styling with an offset so the outline doesn't touch the background */
.text-play:focus-visible {
	outline: 3px solid #41DAF2;
	outline-offset: 4px;
}

/* Controls for the pop-up video of the reel */
.video-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 9999;
}

/* Locks the background scroll when the modal is open */
body.scroll-locked {
	overflow: hidden;
}

/* Style and position for the pop-up */
.video-content {
	position: relative;
}

/* Wrapper for video frame to control aspect ratio and restore preferred modal size */
.video-frame {
	position: relative;
	width: min(90vw, 1200px);
	max-width: 1200px;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Vertical video modifier */
.video-frame.vertical {
    width: auto;
    max-width: 100%;
    height: 85vh;
    aspect-ratio: 9 / 16;
    padding-bottom: 0;
    margin: 0 auto;
}

/* Ensure embedded iframe fills the video frame */
.video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* Close (x) button */
/* Positioned above loader to remain clickable at all times */
.modal-close {
	position: absolute;
	top: -2.25rem;
	/* amount of space above video */
	right: 0;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;

	font-family: 'Sarala', Helvetica, Arial, sans-serif;
	font-size: 1.7rem;
	font-weight: 400;
	color: #ffffff;
	line-height: 1;

	appearance: none;
	z-index: 3;
}

/* Prevents default focus ring on mouse click while preserving keyboard focus */
.modal-close:focus {
	outline: none;
}

/* Close (x) button hover state */
.modal-close:hover {
	font-weight: 700;
	/* Sarala Bold */
}

/* Close (x) button focus-visible styling */
.modal-close:focus-visible {
	outline: 2px solid #41DAF2;
	outline-offset: 4px;
}

/* Spinner loading overlay for modal video */
/* Covers video area only while loading; non-interactive */
.video-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.6);
	z-index: 2;
	pointer-events: none;
	/* Prevents blocking close button */
}

/* Spinner circle */
.spinner {
	width: 48px;
	height: 48px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

/* Spinner animation */
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Screen-reader accessible text that's visually hidden */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Focus-visible: Removes default focus outlines only when focus-visible is supported */
:focus:not(:focus-visible) {
	outline: none;
}

/* Focus-visible: Fallback for old browsers that don't have focus-visible support */
@supports not selector(:focus-visible) {

	a:focus,
	button:focus,
	.text-play:focus {
		outline: 2px solid #41DAF2;
		outline-offset: 4px;
	}
}

/* Reduced-motion support; automatically removes hover animations, spinner animation, and smooth transitions for users with "prefers-reduced-motion: reduce" */
@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	/* Stop spinner rotation */
	.spinner {
		animation: none !important;
	}

	/* Disable navbar hover-box motion */
	.nav-hover-box {
		transition: none !important;
	}
}

/* Section spacing */
.portfolio-section {
	padding: 4rem 3rem 2rem;
}

/* Section headers */
.section-title {
	font-family: 'Antonio', Helvetica, Arial, sans-serif;
	font-size: 1.6rem;
	font-weight: 600;
	color: #fff;
	margin-bottom: 1.5rem;
	letter-spacing: .08em;
}

/* Responsive row that wraps thumbnails */
.thumbnail-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
}

/* Base thumbnail card size (collapsed state) */
.thumbnail-card {
	position: relative;
	width: clamp(220px, 22vw, 320px);
	transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), z-index 0s linear 0.4s;
	z-index: 1;
}

/* Media container keeps aspect ratio */
.thumbnail-media {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	/* transform animates normally; border-radius snaps after .2s delay */
	transition: transform 0.25s ease, border-radius 0s linear 0.2s;
}

.thumbnail-media img {
	width: 100%;
	height: auto;
	display: block;
}

/* Hide play button by default */
.thumbnail-play {
	position: absolute;
	bottom: 0.75rem;
	left: 0.75rem;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 8px;
	padding: 0.1rem 0.3rem;
	font-family: 'Sarala', Helvetica, Arial, sans-serif;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* Info panel hidden in collapsed state */
.thumbnail-info {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	transition-delay: .2s;
	/* Matches the corner snap delay */
	font-family: 'Sarala', Helvetica, Arial, sans-serif;
	background-color: #fff;
	/* prevents transparency issues */
	color: #000;
	padding: .4rem 0.8rem .4rem .8rem;
	border-radius: 0 0 12px 12px;
	z-index: 10;
}

/* Specific styling for the metadata text strings */
.meta {
	font-family: 'Sarala', Helvetica, Arial, sans-serif;
	font-size: 0.75rem;
	line-height: 1.5;
	color: #000;
	/* Set to black to be visible against the white info box */
}

/* Removes the bottom margin from the last line of text to keep padding even */
.meta:last-child {
	margin-bottom: 0;
}

.info-button {
	position: absolute;
	bottom: .75rem;
	right: .75rem;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	font-family: 'Sarala', Helvetica, Arial, sans-serif;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	display: flex;
	/* Added to center the "i" perfectly */
	align-items: center;
	justify-content: center;
}

.info-button.text-play.svg-only {
	left: 1.7rem;
	bottom: 0.75rem;
	right: auto;
	width: 28px;
	height: 28px;
	padding: 0;
}

.info-button.text-play.svg-only svg {
	width: 70%;
	height: 70%;
	transform: translate(2px, 0px);
}

.thumbnail-card.card-expanded .info-button.text-play.svg-only {
	opacity: 1;
	pointer-events: auto;
}

/* Hover / expanded state */
.thumbnail-card.card-expanded {
	transform: scale(2);
	z-index: 20;
	transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), z-index 0s;
	transition-delay: 0.4s;
}

/* Sharpens only the bottom corners of the image on hover */
.thumbnail-card.card-expanded .thumbnail-media {
	border-radius: 12px 12px 0 0;
	/* 0s delay for transform to start immediately, 0.2s delay for corners to snap later */
	transition-delay: 0s, 0.4s;
}

/* Shows the text info on hover with the delay */
.thumbnail-card.card-expanded .thumbnail-info {
	opacity: 1;
	pointer-events: auto;
	transition-delay: .4s;
}

/* Resets the delay to 0 when the mouse leaves so it disappears instantly */
.thumbnail-info {
	transition-delay: 0s;
	/* No delay on exit */
}

.thumbnail-card.card-expanded .thumbnail-play:hover,
.thumbnail-card.card-expanded .info-button:hover {
	background: #000;
	color: #fff;
	font-weight: 600;
}

.thumbnail-card.card-expanded .thumbnail-play,
.thumbnail-card.card-expanded .info-button {
	opacity: 1;
	pointer-events: auto;
	transition-delay: .4s;
}

/* Triggers the same expansion as hover, but via a manual class for touch */
.thumbnail-card.is-expanded {
	transform: scale(2);
	z-index: 20;
	transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), z-index 0s;
	transition-delay: 0.4s;
}

.thumbnail-card.is-expanded .thumbnail-media {
	border-radius: 12px 12px 0 0;
	transition-delay: .2s;
}

.thumbnail-card.is-expanded .thumbnail-info,
.thumbnail-card.is-expanded .thumbnail-play,
.thumbnail-card.is-expanded .info-button {
	opacity: 1;
	pointer-events: auto;
	transition-delay: .4s;
}

/* Styling for the content inside the Info Modal */
.modal-body-padding {
padding-top: 0.5rem;
padding-left: 2rem;
padding-right: 2rem;
padding-bottom: 2rem;
}

.modal-image {
width: 100%;
display: block;
aspect-ratio: 16 / 9;
object-fit: cover;
}

.modal-image.vertical {
width: 100%;
height: 100%;
aspect-ratio: 4 / 5;
object-fit: cover;
display: block;
}

.modal-image-container {
position: relative;
width: 100%;
line-height: 0;
}

.info-modal-play-btn {
display: none !important;
}

.modal-image-container.vertical .info-modal-play-btn {
display: flex !important;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
width: 70px;
height: 70px;
border-radius: 50% !important;
padding: 0 !important;
margin: 0 !important;
align-items: center;
justify-content: center;
background: white;
border: none;
cursor: pointer;
transition: background 0.2s ease, transform 0.2s ease;
pointer-events: auto;
}

.modal-image-container.vertical .info-modal-play-btn svg {
width: 32px;
height: 32px;
transform: translateX(3px);
}

.modal-image-container.vertical .info-modal-play-btn:hover {
background: #f0f0f0;
transform: translate(-50%, -50%) scale(1.1);
}

.modal-image-container img {
width: 100%;
display: block;
}

.modal-description {
font-size: 1rem;
line-height: 1.5;
margin-top: 1rem;
}

#infoModal, #videoModal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.85);
z-index: 10001;
display: flex;
overflow-y: auto;
align-items: flex-start;
padding: 60px 0;
opacity: 0;
visibility: hidden;
transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

#videoModal {
align-items: center;
padding: 0;
}

#infoModal.is-visible, #videoModal.is-visible {
opacity: 1;
visibility: visible;
}

#infoModalContent {
background: white;
border-radius: 12px;
overflow: hidden;
width: min(90vw, 1000px);
color: black;
font-family: 'Sarala', sans-serif;
margin: 0 auto 80px;
transform: translateY(30px);
transition: transform 0.4s ease;
}

#infoModal.is-visible #infoModalContent {
transform: translateY(0);
}

/* Layout grid for the metadata */
.modal-info-grid {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 15px;
	width: 100%;
}

.info-row {
	flex: none;
	display: block;
}

/* Typography for new metadata */
.meta-main {
	font-weight: 600;
	font-size: 1rem;
	margin-bottom: 4px;
}

.meta-sub {
	font-size: 1rem;
	line-height: 1.3;
	color: #444;
	margin-bottom: 15px;
}

.modal-logline {
	font-size: .8rem;
	line-height: 1.4;
	color: #333;
}

.modal-resp-text {
	font-size: .8rem;
	line-height: 1.4;
	margin-top: 10px;
	color: #333;
}

.modal-divider {
	border: 0;
	border-top: 1px solid #eee;
	margin: 25px 0;
}

.modal-credits-section {
	margin-top: 30px;
	border-top: 1px solid #eee;
	padding-top: 20px;
}

.credit-row {
	display: flex;
	align-items: center;
	gap: 20px;
	/* Space between image and text */
	margin-bottom: 20px;
	text-align: left;
}

.credit-thumb {
	width: 180px;
	/* Adjust size as needed */
	aspect-ratio: 16/9;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
	/* Prevents image from being squished by long text */
}

.credit-text {
	font-size: 0.85rem;
	line-height: 1.2;
	color: #333;
}

.modal-watch-container {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 20px 0;
	/* Space between logline and credits */
}

.watch-button {
	display: inline-block;
	background-color: #000;
	color: #fff;
	border: 3px solid transparent;
	text-decoration: none;
	font-family: 'Sarala', sans-serif;
	font-weight: 600;
	padding: 10px 30px;
	border-radius: 50px;
	/* Capsule shape */
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.watch-button:hover {
	background-color: #fff;
	border: 3px solid #000;
	color: #000;
}

/* Hide the container if no link is provided */
.modal-watch-container.hidden {
	display: none;
}

/* 9x16 Vertical Thumbnail */
.thumbnail-card.vertical {
	width: clamp(140px, 14vw, 200px);
}

.thumbnail-card.vertical .thumbnail-media {
	aspect-ratio: 9 / 16;
}

.thumbnail-card.vertical .thumbnail-media img {
	height: 100%;
	object-fit: cover;
}

#textModal .video-content {
  background: #fff;
  border-radius: 12px;
  max-width: 1200px;
  width: 95%;
  margin: 40px auto;
  color: #000;
  position: relative;
  /* Allows the modal itself to scroll if the content is too long */
  max-height: none;
  overflow-y: visible;
}

#textModal {
  /* This ensures the backdrop covers the full scrollable area */
  align-items: flex-start;
  overflow-y: auto;
  padding: 20px 0;
}

#textModalTitle {
  font-family: 'Antonio', sans-serif;
  font-size: 2.8rem;
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
}

#textModal .modal-body-padding {
  padding-top: 33px;
}

#textModalBody {
  font-family: 'Sarala', sans-serif;
  font-size: 1.5rem;
  line-height: 1.33;
}

#contactModal .video-content {
  background: #fff;
  border-radius: 12px;
  max-width: 1200px;
  width: 95%;
  margin: 40px auto;
  color: #000;
  position: relative;
  /* Allows the modal itself to scroll if the content is too long */
  max-height: none;
  overflow-y: visible;
}

#contactModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  align-items: center;
  overflow-y: auto;
  padding: 20px 0;
}

#contactModalTitle {
  font-family: 'Antonio', sans-serif;
  font-size: 3.2rem;
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
}

#contactModal .modal-body-padding {
  padding-top: 33px;
}

#contactModalBody {
  font-family: 'Sarala', sans-serif;
  font-size: 2.2rem;
  line-height: 1.33;
}

#contactModal.is-visible {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

#contactModal .video-content {
  background: #fff;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  margin: 0;
  color: #000;
  text-align: center;
  padding: 40px;
}

.video-modal.is-visible {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}