/*
Theme Name: The WP Office
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-wp-office
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* === Collage: The WP Office — found-footage 90s sitcom === */

/* Whole-site grain treatment; unifies every photo into one camcorder series. */
.wp-site-blocks img {
	filter: contrast(0.93) saturate(0.82) sepia(0.12);
}

/* --- Header bar (the "credits" strip) --- */
.site-header {
	background: rgba(245, 240, 228, 0.86);
	backdrop-filter: blur(6px);
	border-bottom: 2px dashed rgba(46, 42, 36, 0.28);
}
.site-header .brand-dot {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--red);
	margin: 0;
}
.site-header .brand-mark .wp-block-site-title {
	font-size: 1.15rem;
	margin: 0 0 0 10px;
}
.site-header .main-nav a {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* --- Lower-third / broadcast label (shrink-wrapped by a flex row) --- */
.lower-third {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--charcoal);
	padding: 6px 12px;
	margin: 0;
}

/* --- Broadcast headline with TV drop shadow --- */
.is-style-broadcast {
	text-shadow: 3px 3px 0 rgba(32, 29, 25, 0.55);
}

/* --- Tilt utilities for the pinboard --- */
.rotate-l { transform: rotate(-2deg); }
.rotate-r { transform: rotate(2deg); }
.rotate-1 { transform: rotate(1deg); }
.rotate-m1 { transform: rotate(-1deg); }

/* --- Cards & tape (collage) --- */
.is-style-card {
	background: var(--wp--preset--color--cream);
	border: 1px solid rgba(46, 42, 36, 0.14);
	box-shadow: 6px 8px 0 rgba(46, 42, 36, 0.12);
	border-radius: var(--wp--custom--rounded--md);
	padding: var(--wp--preset--spacing--lg);
}
.is-style-taped {
	position: relative;
}
.is-style-taped::before {
	content: "";
	position: absolute;
	top: -11px;
	left: 50%;
	transform: translateX(-50%) rotate(-4deg);
	width: 76px;
	height: 20px;
	background: rgba(201, 162, 75, 0.55);
	border-left: 2px solid rgba(201, 162, 75, 0.6);
	border-right: 2px solid rgba(201, 162, 75, 0.6);
}

/* --- Tilted, framed photographs --- */
.is-style-tilt {
	transform: rotate(2.5deg);
	border: 8px solid var(--wp--preset--color--cream);
	box-shadow: 8px 10px 0 rgba(46, 42, 36, 0.18);
}
.is-style-tilt-rev {
	transform: rotate(-2.5deg);
	border: 8px solid var(--wp--preset--color--cream);
	box-shadow: 8px 10px 0 rgba(46, 42, 36, 0.18);
}

/* --- Services --- */
.is-style-card .svc-icon {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--red);
	margin: 0 0 12px 0;
}
.is-style-card h3 {
	margin-top: 0;
}

/* --- Cast --- */
.cast-card {
	position: relative;
}
.cast-card .cast-name {
	font-family: var(--wp--preset--font-family--archivo-black);
	font-size: 1.25rem;
	margin: 14px 0 2px 0;
}
.cast-card .cast-role {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--red);
	margin: 0 0 10px 0;
}
.cast-card .cast-bio {
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--wp--preset--color--text);
	opacity: 0.85;
	margin: 0 0 4px 0;
}
.cast-card .cast-surname {
	display: block;
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: 0.7em;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--red);
	opacity: 0.75;
	margin-top: 2px;
}
.svc-img {
	margin: 0 0 16px 0;
}
.svc-img img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}
.footer-fineprint {
	color: var(--wp--preset--color--cream);
	font-size: 0.85rem;
	line-height: 1.5;
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
	opacity: 0.72;
}
.cast-card img {
	border: 6px solid var(--wp--preset--color--cream);
	box-shadow: 6px 8px 0 rgba(46, 42, 36, 0.15);
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

/* --- 2026 contrast band --- */
.band-future .lower-third {
	background: var(--wp--preset--color--charcoal);
}
.band-future {
	color: var(--wp--preset--color--cream);
}
.band-future .sec-title,
.band-future p:not(.lower-third) {
	color: var(--wp--preset--color--cream);
}

/* --- Footer credits --- */
.site-footer .footer-credit {
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin-bottom: 8px;
}
.site-footer .footer-byline {
	color: var(--wp--preset--color--primary);
	margin: 0 0 4px 0;
}
.site-footer .footer-tag {
	opacity: 0.75;
}
.site-footer .wp-block-separator {
	width: 90px;
	margin-inline: auto;
	opacity: 0.8;
}
.site-footer .footer-copy {
	opacity: 0.6;
	font-size: 0.85rem;
}
.site-footer .footer-tag,
.site-footer .footer-copy {
	color: var(--wp--preset--color--cream);
}

/* --- Jetpack form fields --- */
.wp-block-jetpack-contact-form input[type="text"],
.wp-block-jetpack-contact-form input[type="email"],
.wp-block-jetpack-contact-form textarea {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 1rem;
	padding: 10px 12px;
	border: 1px solid rgba(46, 42, 36, 0.25);
	border-radius: var(--wp--custom--rounded--sm);
	background: #fff;
}
.wp-block-jetpack-contact-form input:focus,
.wp-block-jetpack-contact-form textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: none;
}

/* --- Test de fotograma: filmstrip + lightbox --- */
.filmstrip-section {
	padding-block: var(--wp--preset--spacing--xl);
}
.filmstrip {
	position: relative;
	transform: rotate(-1.5deg);
	background: var(--wp--preset--color--charcoal);
	border-radius: var(--wp--custom--rounded--sm);
	padding: 28px 18px;
	gap: 0;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
/* Sprocket holes punched along the top and bottom edge of the strip. */
.filmstrip::before,
.filmstrip::after {
	content: "";
	position: absolute;
	left: 18px;
	right: 18px;
	height: 16px;
	background-image: repeating-linear-gradient(
		to right,
		transparent 0 8px,
		var(--wp--preset--color--cream) 8px 26px,
		transparent 26px 34px
	);
	border-radius: 3px;
	opacity: 0.88;
}
.filmstrip::before { top: 7px; }
.filmstrip::after { bottom: 7px; }
.filmstrip .film-frame {
	flex: 0 0 auto;
	margin: 0 !important;
	border: 6px solid var(--wp--preset--color--charcoal);
	background: var(--wp--preset--color--charcoal);
}
.filmstrip .film-frame img {
	display: block;
	width: auto;
	height: 152px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	margin: 0;
	cursor: zoom-in;
}
.film-caption {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--red);
	margin-top: var(--wp--preset--spacing--lg);
}

/* --- Proyector (lightbox) --- */
.film-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(20, 18, 15, 0.94);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 72px;
}
.film-lightbox-img {
	max-width: 86vw;
	max-height: 80vh;
	border: 10px solid var(--wp--preset--color--charcoal);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
	background: var(--wp--preset--color--charcoal);
	display: block;
}
.film-nav,
.film-close {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	color: var(--wp--preset--color--charcoal);
	background: var(--wp--preset--color--primary);
	border: none;
	border-radius: var(--wp--custom--rounded--sm);
	cursor: pointer;
	line-height: 1;
}
.film-nav:hover,
.film-close:hover {
	background: var(--wp--preset--color--cream);
}
.film-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.4rem;
	padding: 16px 20px;
}
.film-nav-prev { left: 20px; }
.film-nav-next { right: 20px; }
.film-close {
	position: absolute;
	top: 22px;
	right: 26px;
	font-size: 1.7rem;
	padding: 10px 18px;
}
.film-counter {
	position: absolute;
	bottom: 26px;
	left: 50%;
	transform: translateX(-50%);
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--cream);
	background: var(--wp--preset--color--charcoal);
	padding: 8px 16px;
	border-radius: var(--wp--custom--rounded--sm);
}

/* --- Pinboard fallback: relax rotations & overlaps on small screens --- */
@media (max-width: 782px) {
	.rotate-l, .rotate-r, .rotate-1, .rotate-m1,
	.is-style-tilt, .is-style-tilt-rev {
		transform: none;
	}
	.is-style-taped {
		margin-top: var(--wp--preset--spacing--md);
	}
	.filmstrip {
		transform: none;
	}
	.filmstrip .film-frame img {
		height: 120px;
	}
	.film-lightbox {
		padding: 48px 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.film-lightbox,
	.film-lightbox-img,
	.film-nav,
	.film-close {
		transition: none;
		animation: none;
	}
}
