/* =========================================
   JaredAmy Media — Custom Theme Styles
   Version 1.5.5 Launch Candidate
   ========================================= */

:where(.wp-site-blocks) {
	overflow-x: clip;
}

.section-pad {
	padding-top: clamp(3.5rem, 7vw, 5.5rem);
	padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.eyebrow {
	margin-bottom: 0.75rem;
}

.jam-hero .hero-title {
	font-size: clamp(2.5rem, 6vw, 4.75rem);
	max-width: 15ch;
}

.jam-hero .hero-copy {
	max-width: 62ch;
}

.jam-proof-strip {
	padding-top: 1.1rem;
	padding-bottom: 1.1rem;
}

.jam-proof-strip p {
	margin-top: 0.25rem;
	margin-bottom: 0.25rem;
}

.service-card,
.client-quote,
.content-callout {
	box-shadow: 0 8px 24px rgba(47, 47, 47, 0.08);
}

.client-quote {
	border: 0;
	border-radius: 12px;
	padding: clamp(2rem, 5vw, 3rem);
	font-size: clamp(1.2rem, 2.2vw, 1.6rem);
	line-height: 1.55;
}

.client-quote cite {
	display: block;
	margin-top: 1.25rem;
	font-size: 0.9rem;
	font-style: normal;
	font-weight: 700;
}

.process-number {
	margin-bottom: 0.35rem;
}

/* --- Portfolio cards --- */
.portfolio-card {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	box-shadow: 0 1px 3px rgba(47, 47, 47, 0.08);
	overflow: hidden;
}

.portfolio-card:hover,
.portfolio-card:focus-within {
	transform: translateY(-6px);
	box-shadow: 0 12px 24px rgba(47, 47, 47, 0.15);
}

.portfolio-card .wp-block-post-featured-image,
.related-project-image {
	margin: 0;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	display: block;
}

.portfolio-card .wp-block-post-featured-image img,
.related-project-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.portfolio-card:hover .wp-block-post-featured-image img,
.portfolio-card:focus-within .wp-block-post-featured-image img,
.related-project-card:hover .related-project-image img,
.related-project-card:focus-within .related-project-image img {
	transform: scale(1.04);
}

.portfolio-card .wp-block-post-title a,
.related-project-card h3 a {
	color: var(--wp--preset--color--contrast);
	transition: color 0.2s ease;
}

.portfolio-card:hover .wp-block-post-title a,
.portfolio-card:focus-within .wp-block-post-title a,
.related-project-card:hover h3 a,
.related-project-card:focus-within h3 a {
	color: var(--wp--preset--color--contrast);
	text-decoration-thickness: 2px;
}

/* --- Related projects rendered by shortcode --- */
.related-projects-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}

.related-project-card {
	background: var(--wp--preset--color--white);
	border-radius: 12px;
}

.related-project-copy {
	padding: 1.25rem 1.5rem 1.5rem;
}

.related-project-copy h3 {
	font-size: 1.2rem;
	margin-top: 0;
	margin-bottom: 0.6rem;
}

.related-project-copy p {
	margin-bottom: 0;
}

/* --- Project Meta Row (client · type · platform) --- */
.project-meta {
	font-size: 1rem;
	color: var(--wp--preset--color--contrast);
	margin: 0;
	font-weight: 600;
}

.project-meta-dot {
	color: var(--wp--preset--color--secondary);
	margin: 0 0.35em;
}

.project-hero-image img {
	width: 100%;
	height: auto;
}

/* --- Header/footer --- */
.site-header {
	position: relative;
	z-index: 20;
	border-bottom: 1px solid var(--wp--preset--color--neutral);
}

.site-branding .wp-block-site-title a,
.site-footer .wp-block-site-title a {
	text-decoration: none;
}

.site-footer a {
	color: var(--wp--preset--color--base);
	text-decoration-color: var(--wp--preset--color--primary);
	text-underline-offset: 0.18em;
}

.header-cta .wp-element-button {
	padding: 0.65rem 0.9rem;
	font-size: 0.9rem;
	line-height: 1.2;
	white-space: nowrap;
}

.footer-link-list {
	list-style: none;
	padding-left: 0;
}

.footer-link-list li + li {
	margin-top: 0.45rem;
}

.fallback-entry {
	border-bottom: 1px solid var(--wp--preset--color--neutral);
}

/* --- Buttons and focus states --- */
.wp-element-button {
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.wp-element-button:hover {
	transform: translateY(-1px);
}

.wp-block-button:not(.is-style-outline) .wp-element-button:hover {
	background: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--contrast) !important;
}

:where(a, button, input, textarea, select, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

@media (max-width: 900px) {
	.related-projects-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.header-cta {
		display: none;
	}
}

@media (max-width: 600px) {
	.related-projects-grid {
		grid-template-columns: 1fr;
	}

	.jam-hero {
		min-height: 70vh !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	.portfolio-card:hover,
	.portfolio-card:focus-within,
	.wp-element-button:hover {
		transform: none;
	}
}


/* --- v1.5.1 work architecture + testimonials --- */
.testimonial-section .featured-testimonial {
	margin-top: 2rem;
	margin-bottom: 0;
}

.featured-testimonial p {
	font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}

.photo-gallery-content .wp-block-gallery,
.photo-gallery-content .wp-block-image {
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

.photo-gallery-content .wp-block-gallery img,
.photo-gallery-content .wp-block-image img {
	border-radius: 10px;
}

.primary-navigation .wp-block-navigation-item__content {
	text-underline-offset: 0.22em;
}

@media (max-width: 1100px) {
	.primary-navigation {
		font-size: 0.92rem;
	}
}

/* --- v1.5.2 services page --- */
.services-hero h1 {
	max-width: 17ch;
	margin-left: auto;
	margin-right: auto;
}

.services-hero > .wp-block-group__inner-container,
.services-intro > .wp-block-group__inner-container {
	width: 100%;
}

.service-detail-section {
	scroll-margin-top: 6rem;
}

.service-side-card {
	box-shadow: 0 8px 24px rgba(47, 47, 47, 0.08);
}

.service-detail-section .wp-block-list {
	padding-left: 1.2rem;
}

.service-detail-section .wp-block-list li + li {
	margin-top: 0.5rem;
}

.deliverables-grid .wp-block-column {
	border-top: 2px solid var(--wp--preset--color--primary);
	padding-top: 1.25rem;
}

.services-testimonials .client-quote {
	height: 100%;
	box-sizing: border-box;
}

@media (max-width: 781px) {
	.services-hero {
		padding-top: 4rem !important;
		padding-bottom: 4rem !important;
	}

	.service-side-card {
		margin-top: 1rem;
	}
}


/* =========================================
   v1.5.4 — Mobile layout refinement
   ========================================= */

:root {
	--jam-mobile-gutter: clamp(1.15rem, 5vw, 1.5rem);
}

.site-main h1,
.site-main h2,
.site-main h3 {
	text-wrap: balance;
}

.site-main p,
.site-main li {
	text-wrap: pretty;
}

@media (max-width: 900px) {
	/* Keep the mobile header focused: brand + menu only. */
	.site-header .header-cta {
		display: none !important;
	}

	.site-header {
		padding: 0.75rem var(--jam-mobile-gutter) !important;
	}

	.site-header > .wp-block-group,
	.site-header .header-row {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: 0.75rem;
		width: 100%;
	}

	.site-branding {
		min-width: 0;
		gap: 0.55rem !important;
	}

	.site-branding .wp-block-site-logo {
		flex: 0 0 auto;
		margin: 0;
	}

	.site-branding .wp-block-site-logo img,
	.site-branding .custom-logo {
		width: 40px !important;
		max-width: 40px !important;
		height: auto;
	}

	.site-branding .wp-block-site-title {
		min-width: 0;
		margin: 0 !important;
		font-size: 1rem !important;
		line-height: 1.1;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.primary-navigation {
		justify-self: end;
		font-size: 1rem;
	}

	.primary-navigation .wp-block-navigation__responsive-container-open {
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 1px solid var(--wp--preset--color--neutral);
		border-radius: 8px;
		background: transparent;
		color: var(--wp--preset--color--contrast);
	}

	.primary-navigation .wp-block-navigation__responsive-container-open svg,
	.primary-navigation .wp-block-navigation__responsive-container-close svg {
		width: 22px;
		height: 22px;
	}

	.primary-navigation .wp-block-navigation__responsive-container.is-menu-open {
		padding: 1.25rem var(--jam-mobile-gutter) 2rem;
		background: var(--wp--preset--color--base) !important;
		color: var(--wp--preset--color--contrast) !important;
	}

	.primary-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		padding-top: 3.25rem;
	}

	.primary-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		font-size: 1.15rem;
		line-height: 1.35;
		padding: 0.55rem 0;
	}
}

@media (max-width: 781px) {
	/* A single predictable gutter on every full-width content section. */
	.site-main > .alignfull {
		box-sizing: border-box;
		padding-left: var(--jam-mobile-gutter) !important;
		padding-right: var(--jam-mobile-gutter) !important;
	}

	.site-main > .wp-block-cover.alignfull .wp-block-cover__inner-container {
		width: 100%;
	}

	.site-main .section-pad {
		padding-top: 3rem !important;
		padding-bottom: 3rem !important;
	}

	.site-main h1 {
		line-height: 1.08;
	}

	.site-main h2 {
		line-height: 1.16;
	}

	.site-main p,
	.site-main li {
		line-height: 1.72;
	}

	/* Buttons remain finger-friendly without becoming oversized. */
	.site-main .wp-block-buttons {
		gap: 0.7rem;
	}

	.site-main .wp-element-button {
		box-sizing: border-box;
		min-height: 44px;
		padding: 0.72rem 1rem;
		font-size: 0.95rem;
		line-height: 1.2;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		text-align: center;
	}

	/* Hero scale and spacing. */
	.jam-hero {
		min-height: 66vh !important;
		padding-top: 3.25rem !important;
		padding-bottom: 3.25rem !important;
	}

	.jam-hero .hero-title {
		font-size: clamp(2.15rem, 10vw, 3.1rem) !important;
		max-width: 13ch;
	}

	.jam-hero .hero-copy {
		font-size: 1.05rem !important;
		line-height: 1.65 !important;
	}

	.services-hero {
		padding-top: 3.25rem !important;
		padding-bottom: 3.25rem !important;
	}

	.services-hero h1 {
		font-size: clamp(2.05rem, 9.5vw, 2.8rem) !important;
		line-height: 1.08 !important;
		max-width: 15ch;
	}

	.services-hero > p:not(.eyebrow),
	.services-hero .wp-block-group > p:not(.eyebrow) {
		font-size: 1.05rem !important;
	}

	.services-hero .wp-block-buttons,
	.jam-hero .wp-block-buttons {
		justify-content: flex-start;
	}

	/* Proof strips become a compact 2x2 grid instead of a long stack. */
	.jam-proof-strip .wp-block-columns {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 !important;
		margin: 0;
	}

	.jam-proof-strip .wp-block-column {
		padding: 0.55rem 0.45rem;
	}

	.jam-proof-strip .wp-block-column p {
		font-size: 0.82rem;
		line-height: 1.35;
		margin: 0;
	}

	/* Service sections: less dead space and clearer reading width. */
	.service-detail-section .wp-block-columns,
	.deliverables-grid,
	.process-grid,
	.services-testimonials .wp-block-columns {
		gap: 1.35rem !important;
	}

	.service-detail-section h2 {
		font-size: clamp(1.65rem, 7.5vw, 2.05rem);
	}

	.service-side-card {
		margin-top: 0.5rem;
		padding: 1.5rem !important;
	}

	.service-card {
		padding: 1.5rem !important;
	}

	/* Project pages: comfortable reading and no accidental mobile full-bleed media. */
	body.single-project .site-main > .wp-block-group:first-child {
		padding-top: 2.75rem !important;
		padding-bottom: 2rem !important;
	}

	body.single-project .wp-block-post-title {
		font-size: clamp(2rem, 9vw, 2.5rem) !important;
		line-height: 1.08 !important;
		overflow-wrap: anywhere;
	}

	body.single-project .project-meta {
		font-size: 0.9rem;
		line-height: 1.55;
	}

	body.single-project .wp-block-post-content {
		font-size: 1rem;
		line-height: 1.75;
	}

	body.single-project .wp-block-post-content > p {
		margin-top: 1.05rem;
		margin-bottom: 1.05rem;
	}

	body.single-project .wp-block-post-content > h2 {
		margin-top: 2.4rem;
		margin-bottom: 0.9rem;
	}

	body.single-project .wp-block-post-content > h3 {
		margin-top: 2rem;
		margin-bottom: 0.75rem;
	}

	body.single-project .wp-block-post-content > .alignwide,
	body.single-project .wp-block-post-content > .alignfull {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	body.single-project .wp-block-post-content .wp-block-image,
	body.single-project .wp-block-post-content .wp-block-gallery {
		margin-top: 1.5rem;
		margin-bottom: 1.5rem;
	}

	body.single-project .wp-block-post-content .wp-block-image img,
	body.single-project .wp-block-post-content .wp-block-gallery img,
	body.single-project .project-hero-image img {
		border-radius: 10px;
	}

	body.single-project .wp-block-post-content figcaption {
		margin-top: 0.55rem;
		font-size: 0.8rem;
		line-height: 1.45;
	}

	/* Project cards and related work get a clean one-column mobile rhythm. */
	.portfolio-grid,
	.related-projects-grid {
		grid-template-columns: 1fr !important;
		gap: 1.25rem !important;
	}

	.portfolio-card .wp-block-group,
	.related-project-copy {
		box-sizing: border-box;
	}

	/* Gallery: preserve image impact while keeping consistent edge padding and gaps. */
	.photo-gallery-content {
		padding-top: 2.25rem !important;
		padding-bottom: 2.75rem !important;
	}

	.photo-gallery-content .wp-block-post-content,
	.photo-gallery-content .wp-block-gallery,
	.photo-gallery-content .gallery {
		width: 100%;
		max-width: 100%;
	}

	.photo-gallery-content .wp-block-gallery.has-nested-images,
	.photo-gallery-content .gallery {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.85rem !important;
		align-items: start;
	}

	.photo-gallery-content .wp-block-gallery.has-nested-images figure.wp-block-image,
	.photo-gallery-content .gallery .gallery-item {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
	}

	.photo-gallery-content .wp-block-image.alignwide,
	.photo-gallery-content .wp-block-image.alignfull,
	.photo-gallery-content .wp-block-gallery.alignwide,
	.photo-gallery-content .wp-block-gallery.alignfull {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.photo-gallery-content img {
		display: block;
		width: 100%;
		height: auto;
		border-radius: 10px;
	}

	/* Testimonials are easier to scan on narrow screens. */
	.client-quote {
		padding: 1.5rem;
		font-size: 1.05rem;
		line-height: 1.6;
	}

	.featured-testimonial p {
		font-size: 1.1rem;
	}

	/* Footer uses the same mobile gutter as the main content. */
	.site-footer {
		padding: 3rem var(--jam-mobile-gutter) 2rem !important;
	}

	.site-footer .wp-block-columns {
		gap: 2rem !important;
	}

	.site-footer .wp-block-column {
		margin: 0;
	}
}

@media (max-width: 599px) {
	.primary-navigation .wp-block-navigation__responsive-container-open {
		display: inline-flex !important;
	}
}

@media (max-width: 560px) {
	/* A single strong image per row reads better than tiny thumbnails on phones. */
	.photo-gallery-content .wp-block-gallery.has-nested-images,
	.photo-gallery-content .gallery {
		grid-template-columns: 1fr;
		gap: 1rem !important;
	}

	.jam-proof-strip .wp-block-column p {
		font-size: 0.78rem;
	}

	.services-hero .wp-block-buttons,
	.jam-hero .wp-block-buttons {
		flex-direction: column;
		align-items: flex-start;
	}

	.services-hero .wp-block-button,
	.jam-hero .wp-block-button {
		margin: 0;
	}
}


/* =========================================
   v1.5.5 — Native project video + editorial media
   ========================================= */

.project-editorial-pair {
	gap: clamp(1rem, 2.5vw, 1.5rem);
	align-items: flex-start;
	margin-top: 1.75rem;
	margin-bottom: 1.75rem;
}

.project-editorial-pair .wp-block-image,
.project-editorial-image {
	margin-top: 0;
	margin-bottom: 0;
}

.project-editorial-pair img,
.project-editorial-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.project-video-wrap {
	width: 100%;
	max-width: 430px;
	margin: 1.75rem auto 2.5rem;
}

.project-vertical-video {
	width: 100%;
	max-width: 430px;
	margin: 0 auto;
}

.project-vertical-video video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 9 / 16;
	object-fit: cover;
	border-radius: 12px;
	background: var(--wp--preset--color--contrast);
	box-shadow: 0 10px 30px rgba(47, 47, 47, 0.12);
}

@media (max-width: 781px) {
	.project-editorial-pair {
		gap: 1rem !important;
		margin-top: 1.35rem;
		margin-bottom: 1.35rem;
	}

	.project-video-wrap,
	.project-vertical-video {
		max-width: min(100%, 430px);
	}

	.project-video-wrap {
		margin-top: 1.35rem;
		margin-bottom: 2rem;
	}
}
