/*
Theme Name: Spacial Installations
Theme URI: https://www.spacial-installations.co.uk/
Author: Spacial Installations
Description: Lean custom classic theme for Spacial Installations — event structures, set design & build, shipping-container conversions. Replaces Elementor + commercial plugins.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: spacial
*/

/* ===== Design tokens ===== */
:root {
	--bg: #000;
	--bg-2: #0c0c0c;
	--text: #fff;
	--muted: #cfcfcf;
	--ink: #1a1a1a;          /* dark text on light pages */
	--ink-muted: #555;
	--grey: #54595f;
	--line: rgba(255,255,255,.15);
	--line-light: rgba(0,0,0,.12);
	--maxw: 1200px;
	--head: "Fjalla One", Impact, sans-serif;
	--body: "Roboto", -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
}

/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: #fff;            /* light theme by default (inner pages) */
	color: var(--ink);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.7;
	font-weight: 400;
	overflow-x: hidden;
}
body.home { background: #fff; }   /* home body white; dark sections are image-based with narrow white gutters */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { opacity: .7; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; color: inherit; }
p { margin: 0 0 1.2em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; color: #000; padding: 8px 14px; z-index: 1000; }

/* ===== Buttons ===== */
.btn {
	display: inline-block; font-family: var(--head); text-transform: uppercase;
	letter-spacing: 1px; font-size: 15px; padding: 14px 34px; cursor: pointer;
	border: 2px solid #fff; transition: all .25s ease; background: transparent; color: #fff;
}
.btn--outline:hover { background: #fff; color: #000; }
.btn--solid { background: #fff; color: #000; }
.btn--solid:hover { background: transparent; color: #fff; }
/* dark button for light/white content areas */
.btn--dark { border-color: #1a1a1a; color: #1a1a1a; }
.btn--dark:hover { background: #1a1a1a; color: #fff; }

/* ===== Header ===== */
.site-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 200;
	background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 100%);
	transition: padding .25s ease, background .25s ease, backdrop-filter .25s ease;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; transition: padding .25s ease; }
.site-header.is-scrolled .site-header__inner { padding: 10px 24px; }
.site-header.is-scrolled { background: rgba(0,0,0,.95); backdrop-filter: blur(6px); }
/* Solid header on inner pages; transparent over a top banner (home + single project) */
body:not(.home):not(.single-project) .site-header { background: #000; }
.site-header__logo img { width: auto; height: 78px; transition: height .25s ease; }
.site-header.is-scrolled .site-header__logo img { height: 56px; }

.site-nav__menu { list-style: none; display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; }
.site-nav__menu a {
	font-family: var(--body); text-transform: none; letter-spacing: normal;
	font-size: 1.1rem; font-weight: 600; color: #fff; position: relative; padding: 6px 0;
}
.site-nav__menu a:hover { color: var(--muted); }
.site-nav__menu .current-menu-item > a::before,
.site-nav__menu a:hover::before { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: #fff; }
.site-nav__menu .menu-item-has-children > a::after { content: " \25BE"; font-size: .7em; vertical-align: middle; opacity: .85; }
.site-nav__menu .sub-menu {
	list-style: none; margin: 0; padding: 10px 0; position: absolute; top: 100%; left: 0;
	background: #000; min-width: 230px; border: 1px solid var(--line);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s ease; z-index: 50;
}
.site-nav__menu li { position: relative; }
.site-nav__menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.site-nav__menu .sub-menu a { display: block; padding: 8px 20px; font-size: 14px; }
.site-nav__menu .sub-menu a::after { display: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle__bar { width: 26px; height: 2px; background: #fff; transition: transform .25s ease, opacity .25s ease; }

/* ===== Hero ===== */
.site-main { display: block; }
.hero { position: relative; height: 100vh; min-height: 600px; overflow: hidden; }
.hero__track { display: flex; height: 100%; will-change: transform; transition: transform .5s ease-in-out; }
.hero__slide {
	position: relative; flex: 0 0 100%; width: 100%; height: 100%;
	background-size: cover; background-position: center;
	display: flex; align-items: center;
}
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.65)); }

/* Content fade-up (matches Elementor "fadeInUp" content animation) */
.hero__slide .hero__heading,
.hero__slide .hero__sub,
.hero__slide .hero__content .btn { opacity: 0; }
.hero__slide.is-current .hero__heading { animation: spacial-fadeInUp .8s .25s both; }
.hero__slide.is-current .hero__sub { animation: spacial-fadeInUp .8s .4s both; }
.hero__slide.is-current .hero__content .btn { animation: spacial-fadeInUp .8s .55s both; }
@keyframes spacial-fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.hero__slide .hero__heading, .hero__slide .hero__sub, .hero__slide .hero__content .btn { opacity: 1; }
	.hero__slide.is-current .hero__heading, .hero__slide.is-current .hero__sub, .hero__slide.is-current .hero__content .btn { animation: none; }
}
.hero__content { position: relative; z-index: 2; text-align: center; max-width: 900px; color: #fff; }
.hero__heading { font-size: clamp(2.4rem, 6vw, 5rem); text-transform: uppercase; margin-bottom: .2em; }
.hero__sub { font-family: var(--head); font-size: clamp(1.1rem, 2.4vw, 1.7rem); color: var(--muted); margin-bottom: 1.6em; text-transform: uppercase; letter-spacing: 1px; }
.hero__arrow {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
	background: rgba(0,0,0,.3); color: #fff; border: 0; width: 54px; height: 64px;
	font-size: 34px; cursor: pointer; transition: background .2s ease;
}
.hero__arrow:hover { background: rgba(0,0,0,.6); }
.hero__arrow--prev { left: 0; }
.hero__arrow--next { right: 0; }
.hero__dots { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; z-index: 5; }
.hero__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0; }
.hero__dot.is-active { background: #fff; }

/* ===== Feature blocks ===== */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.feature {
	position: relative; min-height: 56vh; display: flex; align-items: center; justify-content: center;
	background-size: cover; background-position: center; overflow: hidden; text-align: center;
}
.feature__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); transition: background .3s ease; z-index: 1; }
.feature:hover .feature__overlay { background: rgba(0,0,0,.25); }
.feature__crossfade { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; animation: spacial-crossfade 9s ease-in-out infinite; }
@keyframes spacial-crossfade { 0%,40% { opacity: 0; } 55%,90% { opacity: 1; } 100% { opacity: 0; } }
.feature__label { position: relative; z-index: 2; }
.feature__label h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); text-transform: uppercase; color: #fff; margin: 0; transition: transform .3s ease; }
.feature:hover .feature__label h2 { transform: scale(1.05); }

/* ===== Services (full-width image, dark text overlaid top + bottom) ===== */
.services { background-size: cover; background-position: center top; min-height: 92vh; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 0; text-align: center; }
.services__title { font-size: clamp(1.3rem, 2.4vw, 2rem); text-transform: uppercase; color: #1a1a1a; max-width: 1100px; margin: 0 auto; text-shadow: 0 0 14px rgba(255,255,255,.9), 0 0 34px rgba(255,255,255,.7); }
.services__list { font-size: clamp(1rem, 1.6vw, 1.3rem); text-transform: uppercase; color: #1a1a1a; font-weight: 400; max-width: 1100px; margin: 0 auto; text-shadow: 0 0 14px rgba(255,255,255,.9), 0 0 34px rgba(255,255,255,.7); }

/* ===== About intro (white, dark text) ===== */
.about-intro { padding: 80px 0; text-align: center; background: #fff; color: var(--ink); }
.about-intro .container { max-width: 880px; }
.about-intro p { font-size: 1.1rem; color: var(--ink-muted); }

/* ===== Archive (light page — matches live) ===== */
body.post-type-archive-project { background: #fff; }
body.post-type-archive-project .site-header { background: #000; }
.archive-head { padding: 150px 0 10px; text-align: center; background: #fff; }
.archive-head__title { font-size: clamp(1.9rem, 3.5vw, 2.8rem); color: #1a1a1a; }
.facet { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: 22px; }
.facet__search { position: relative; display: inline-flex; }
.facet__search input {
	width: 260px; max-width: 60vw; padding: 12px 42px 12px 16px; font-size: 15px; color: #222;
	border: 1px solid #cdcdcd; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat right 12px center;
	border-radius: 2px; font-family: var(--body);
}
.facet__select {
	padding: 12px 16px; font-size: 15px; color: #222; border: 1px solid #cdcdcd; background: #fff;
	min-width: 220px; border-radius: 2px; font-family: var(--body); cursor: pointer;
}
.facet__reset { background: none; border: 0; color: #444; cursor: pointer; font-size: 15px; text-decoration: underline; }
.facet__reset:hover { color: #000; }

.archive-grid-wrap { padding: 28px 0 80px; background: #fff; }
.archive-grid-wrap__inner { width: 96%; max-width: 1800px; margin: 0 auto; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project-card { position: relative; display: block; overflow: hidden; background: #111; aspect-ratio: 3 / 2; }
.project-card__media { position: absolute; inset: 0; }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project-card__overlay {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	text-align: center; padding: 24px; background: rgba(0,0,0,.45); z-index: 2; transition: background .3s ease;
}
.project-card__title { font-family: var(--head); font-size: clamp(1rem, 1.35vw, 1.45rem); text-transform: uppercase; line-height: 1.25; color: #fff; }
.project-card:hover .project-card__media img { transform: scale(1.06); }
.project-card:hover .project-card__overlay { background: rgba(0,0,0,.25); }
.project-grid__empty { text-align: center; color: #555; padding: 50px 0; }
@media (max-width: 1024px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .project-grid { grid-template-columns: 1fr; } }

/* ===== Single project ===== */
.project-banner { position: relative; min-height: 62vh; display: flex; align-items: center; justify-content: center; text-align: center; background-size: cover; background-position: center; background-color: #111; }
.project-banner__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.project-banner .container { position: relative; z-index: 2; }
.project-banner__title { color: #fff; font-size: clamp(2rem, 5vw, 4rem); text-transform: uppercase; margin: 0; }
.single-project__intro { padding: 50px 0 30px; background: #fff; }
.single-project__intro .container { max-width: 960px; text-align: center; }
.single-project__intro p { color: var(--ink-muted); font-size: 1.05rem; }
.single-project__gallery { background: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.gallery-grid__item { display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-2); }
.gallery-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-grid__item:hover img { transform: scale(1.06); }

.single-project__nav { padding: 40px 0; border-top: 1px solid var(--line-light); margin-top: 40px; background: #fff; }
.single-project__nav-inner { display: flex; justify-content: space-between; gap: 20px; }
.pn { max-width: 45%; }
.pn--next { text-align: right; margin-left: auto; }
.pn__dir { display: block; font-family: var(--head); text-transform: uppercase; color: var(--ink-muted); font-size: 13px; }
.pn__title { display: block; font-family: var(--head); font-size: 1.1rem; color: var(--ink); }
.cta { text-align: center; padding: 20px 0 80px; background: #fff; }

/* ===== Page banner (About, Thank You) ===== */
.page-banner {
	position: relative; min-height: 74vh; display: flex; align-items: center; justify-content: center;
	background-size: cover; background-position: center; background-attachment: fixed; text-align: center;
	margin-top: 0;
}
.page-banner--tall { min-height: 78vh; }
.page-banner__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.12); }
.page-banner--tall .page-banner__overlay { background: rgba(0,0,0,.5); }
.page-banner__logo { position: relative; z-index: 2; width: min(1000px, 74vw); height: auto; margin-top: 9vh; }
.page-banner__content { position: relative; z-index: 2; }
.page-banner__title { font-size: clamp(2rem, 5vw, 3.6rem); text-transform: uppercase; color: #fff; }
.page-banner__text { color: var(--muted); font-size: 1.2rem; margin-bottom: 1.4em; }
@media (max-width: 900px) { .page-banner { background-attachment: scroll; min-height: 42vh; } }

/* ===== Generic page (light) ===== */
.page { background: #fff; color: var(--ink); }
.page__head { padding: 150px 0 10px; text-align: center; }
.page__title { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; color: var(--ink); }
.page__body { padding: 24px 0 90px; }
.page__body .container { max-width: 920px; }
.page__body img { margin: 1em auto; }
.page__body a { color: #1a1a1a; text-decoration: underline; }
.page--about .page__head { padding-top: 60px; }   /* banner already gives top space */
.page--about .page__body { text-align: center; }

/* Testimonial — dark band, white text (matches live, sits above footer) */
.testimonial-band { background: #000; padding: 80px 0; text-align: center; }
.testimonial-band .container { max-width: 940px; }
.testimonial { margin: 0 auto; border: 0; padding: 0; }
.testimonial p { font-family: var(--head); font-size: clamp(1.2rem, 2.3vw, 1.7rem); line-height: 1.5; color: #fff; font-style: italic; margin: 0; }
.testimonial cite { display: block; margin-top: 28px; font-style: normal; font-family: var(--head); color: #fff; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 1px; }
.testimonial cite span { display: block; color: var(--muted); font-size: .82rem; margin-top: 4px; letter-spacing: 1px; }

/* Contact (white, two columns) */
.page--contact { background: #fff; padding: 150px 0 0; }
.contact-layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 60px; align-items: start; }
.contact-layout__heading { font-size: clamp(1.5rem, 3vw, 2.3rem); color: var(--ink); margin-bottom: 1em; }
.contact-layout__info h3 { font-size: 1.6rem; color: var(--ink); margin-bottom: .4em; }
.contact-layout__info p { color: var(--ink); }
.contact-email a { font-family: var(--head); font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.contact-social { display: flex; gap: 14px; margin-top: 22px; }
.contact-social img { width: 40px; height: 40px; border-radius: 6px; }
.cf7-row { display: flex; gap: 16px; flex-wrap: wrap; }
.cf7-row .cf7-col { flex: 1 1 200px; }
.iti { width: 100%; }
.wpcf7 p { margin: 0 0 12px; }
.wpcf7 label { color: var(--ink); font-size: 14px; line-height: 1.3; }
.wpcf7 input, .wpcf7 textarea, .wpcf7 select {
	width: 100%; background: #fff; border: 1px solid #cdcdcd; color: #222;
	padding: 10px 14px; font-family: var(--body); font-size: 16px; margin-top: 3px; margin-bottom: 0; border-radius: 2px;
}
.wpcf7 textarea { min-height: 150px; }
.wpcf7 input[type="submit"] {
	width: auto; background: #fff; color: #c2185b; border: 1px solid #c2185b; font-family: var(--head);
	text-transform: uppercase; letter-spacing: 1px; padding: 12px 36px; cursor: pointer; border-radius: 2px;
}
.wpcf7 input[type="submit"]:hover { background: #c2185b; color: #fff; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; gap: 36px; } }
.contact-map { width: 100%; margin: 50px 0 0; }
.contact-map iframe { display: block; width: 100%; height: 620px; border: 0; }

/* ===== Footer ===== */
.site-footer { background: #000; color: var(--muted); }
.site-footer a { color: #fff; }
.site-footer__cta { text-align: center; padding: 60px 0; }
.site-footer__bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 24px; padding-bottom: 24px; border-top: 1px solid var(--line); }
.site-footer__bar p { margin: 0; }
.site-footer__copy { color: var(--muted); font-size: 14px; }
.site-footer__copy a { text-decoration: underline; }
.site-footer__email a { font-family: var(--head); font-size: 15px; }
@media (max-width: 600px) { .site-footer__bar { justify-content: center; text-align: center; } }

/* ===== Lightbox ===== */
body.lb-lock { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.93); display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 90vw; max-height: 86vh; object-fit: contain; }
.lightbox__close { position: absolute; top: 18px; right: 24px; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; line-height: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 60px; cursor: pointer; padding: 0 20px; opacity: .8; }
.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }

/* ===== Cookie banner ===== */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: rgba(10,10,10,.97); border-top: 1px solid var(--line); }
.cookie-banner.is-hidden { display: none; }
.cookie-banner__inner { max-width: var(--maxw); margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.cookie-banner__text { margin: 0; font-size: 14px; color: var(--muted); max-width: 760px; }
.cookie-banner__text a { color: #fff; text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-banner .btn { padding: 10px 26px; font-size: 13px; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-revealed { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
	.features { grid-template-columns: 1fr; }
	.contact-layout { grid-template-columns: 1fr; gap: 30px; }
	.nav-toggle { display: flex; }
	.site-nav {
		position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); background: #000;
		transform: translateX(100%); transition: transform .3s ease; padding: 120px 30px 40px;
		border-left: 1px solid var(--line); overflow-y: auto; z-index: 150;
	}
	body.nav-open .site-nav { transform: translateX(0); }
	.site-nav__menu { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
	.site-nav__menu > li { width: 100%; border-bottom: 1px solid rgba(255,255,255,.1); }
	.site-nav__menu a { display: block; font-size: 19px; padding: 16px 0; }
	.site-nav__menu .menu-item-has-children > a::after { float: right; }
	.site-nav__menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; padding: 0 0 8px 18px; min-width: 0; }
	.site-nav__menu .sub-menu a { font-size: 16px; padding: 10px 0; }
	body.nav-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	body.nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
	body.nav-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.hero { height: 80vh; min-height: 460px; }
	.single-project__nav-inner { flex-direction: column; }
	.pn, .pn--next { max-width: 100%; text-align: left; margin: 0; }
}
