/*
Theme Name: Links Beddings
Theme URI: https://linksbeddings.co.uk
Author: Links Beddings
Description: Responsive construction-services theme for Links Beddings, Manchester. Tokens from Stitch design system "Links Beddings Industrial" (see DESIGN.md).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: links-beddings
WPVibe: yes
*/

/* ---------- Tokens (DESIGN.md) ---------- */
:root {
	--c-amber: #F5A100;
	--c-amber-dark: #D98E00;
	--c-charcoal: #1C1F24;
	--c-steel: #3A4552;
	--c-concrete: #F4F3EF;
	--c-white: #FFFFFF;
	--c-border: #E2E0D9;
	--c-text: #2A2E35;
	--c-muted: #5B6470;
	--c-on-dark-muted: #B7BEC7;

	--f-head: "Barlow Condensed", "Arial Narrow", sans-serif;
	--f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

	--fs-display: clamp(44px, 6vw + 12px, 72px);
	--fs-h1: clamp(34px, 3.2vw + 14px, 48px);
	--fs-h2: clamp(26px, 1.6vw + 18px, 32px);
	--fs-title: clamp(20px, .5vw + 18px, 22px);
	--fs-body-lg: clamp(17px, .3vw + 16px, 18px);
	--fs-body: 16px;
	--fs-label: 14px;

	--s-xs: 4px; --s-sm: 8px; --s-md: 16px; --s-lg: 24px;
	--s-xl: 40px; --s-2xl: 64px; --s-3xl: 96px;

	--radius: 4px;
	--shadow: 0 1px 2px rgba(28,31,36,.06), 0 8px 24px rgba(28,31,36,.06);
	--header-h: 72px;
	--gutter: 16px;
}
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 960px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
	margin: 0; background: var(--c-concrete); color: var(--c-text);
	font-family: var(--f-body); font-size: var(--fs-body); line-height: 1.6;
	overflow-x: hidden;
}
img, svg, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 {
	font-family: var(--f-head); text-transform: uppercase; color: var(--c-charcoal);
	margin: 0 0 var(--s-md); line-height: 1.05; font-weight: 700;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h1); }
h3 { font-size: var(--fs-title); font-weight: 600; line-height: 1.2; }
p { margin: 0 0 var(--s-md); }
:focus-visible { outline: 2px solid var(--c-amber); outline-offset: 2px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000; top: 8px; left: 8px;
	background: var(--c-amber); color: var(--c-charcoal); padding: 12px 16px;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--s-2xl) 0; }
@media (min-width: 960px) { .section { padding: var(--s-3xl) 0; } }
.section--white { background: var(--c-white); }
.section--dark { background: var(--c-charcoal); color: var(--c-on-dark-muted); }
.section--dark h2, .section--dark h3 { color: var(--c-white); }

.eyebrow {
	display: inline-block; font-family: var(--f-head); font-size: var(--fs-label);
	font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	color: var(--c-amber); margin-bottom: var(--s-sm);
}
.section-head { max-width: 720px; margin-bottom: var(--s-xl); }
.section-head h2::before {
	content: ""; display: block; width: 48px; height: 4px; background: var(--c-amber);
	margin-bottom: var(--s-md);
}
.section-head--center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head--center h2::before { margin-left: auto; margin-right: auto; }
.lead { font-size: var(--fs-body-lg); color: var(--c-muted); }
.section--dark .lead { color: var(--c-on-dark-muted); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--s-sm);
	min-height: 48px; padding: 0 var(--s-lg); border-radius: var(--radius);
	font-family: var(--f-head); font-weight: 600; font-size: 17px; letter-spacing: .06em;
	text-transform: uppercase; text-decoration: none; border: 2px solid transparent;
	cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn--primary { background: var(--c-amber); color: var(--c-charcoal); }
.btn--primary:hover { background: var(--c-amber-dark); }
.btn--dark { background: var(--c-charcoal); color: var(--c-white); }
.btn--dark:hover { background: var(--c-steel); }
.btn--outline-light { border-color: var(--c-white); color: var(--c-white); }
.btn--outline-light:hover { background: var(--c-white); color: var(--c-charcoal); }
.btn--outline-dark { border-color: var(--c-charcoal); color: var(--c-charcoal); }
.btn--outline-dark:hover { background: var(--c-charcoal); color: var(--c-white); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-md); }
@media (max-width: 479px) { .btn-row .btn { width: 100%; } }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100; background: var(--c-charcoal);
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-bar .site-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	height: var(--header-h); gap: var(--s-md);
}
.logo {
	display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
	font-family: var(--f-head); font-weight: 800; font-size: 24px; letter-spacing: .04em;
	text-transform: uppercase; color: var(--c-white); white-space: nowrap;
}
.logo__mark { width: 14px; height: 28px; background: var(--c-amber); border-radius: 2px; }
.logo span.accent { color: var(--c-amber); }

.nav-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; background: transparent; border: 0; color: var(--c-white);
	cursor: pointer; border-radius: var(--radius);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
	display: block; width: 24px; height: 2px; background: currentColor; position: relative;
	transition: transform .25s, background .25s;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
	position: fixed; inset: var(--header-h) 0 0 0; background: var(--c-charcoal);
	padding: var(--s-lg) var(--gutter) var(--s-xl); overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.admin-bar .primary-nav { top: calc(var(--header-h) + 46px); }
.nav-open .primary-nav { transform: none; visibility: visible; }
.primary-nav ul { list-style: none; margin: 0 0 var(--s-lg); padding: 0; }
.primary-nav a {
	display: flex; align-items: center; min-height: 56px; text-decoration: none;
	font-family: var(--f-head); font-weight: 600; font-size: 24px; letter-spacing: .04em;
	text-transform: uppercase; color: var(--c-white); border-bottom: 1px solid rgba(255,255,255,.08);
}
.primary-nav .current-menu-item > a, .primary-nav a:hover { color: var(--c-amber); }
.header-actions { display: flex; flex-direction: column; gap: var(--s-md); }
.header-phone {
	display: inline-flex; align-items: center; gap: 8px; color: var(--c-white);
	text-decoration: none; font-weight: 600; min-height: 48px;
}
.header-phone svg { color: var(--c-amber); }
body.nav-open { overflow: hidden; }

@media (min-width: 960px) {
	.nav-toggle { display: none; }
	.primary-nav {
		position: static; transform: none; visibility: visible; background: none; padding: 0;
		display: flex; align-items: center; gap: var(--s-xl); overflow: visible;
	}
	.primary-nav ul { display: flex; gap: var(--s-lg); margin: 0; }
	.primary-nav a {
		min-height: 48px; font-size: 17px; border: 0; position: relative;
	}
	.primary-nav .current-menu-item > a::after {
		content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--c-amber);
	}
	.header-actions { flex-direction: row; align-items: center; gap: var(--s-lg); }
	.header-phone { font-size: 15px; }
}
@media (min-width: 960px) and (max-width: 1099px) { .header-phone .label { display: none; } }

/* ---------- Hero ---------- */
.hero {
	position: relative; color: var(--c-white); background: var(--c-charcoal) center/cover no-repeat;
	min-height: min(88vh, 760px); display: flex; align-items: center;
	padding: var(--s-2xl) 0;
}
.hero::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(28,31,36,.92) 0%, rgba(28,31,36,.75) 50%, rgba(28,31,36,.55) 100%);
}
.hero > .container { position: relative; }
.hero h1 { font-size: var(--fs-display); font-weight: 800; color: var(--c-white); line-height: 1; letter-spacing: -.01em; max-width: 12ch; }
.hero h1 .accent { color: var(--c-amber); }
.hero .lead { color: #D5DAE0; max-width: 56ch; margin-bottom: var(--s-xl); }
.hero-badges {
	display: flex; flex-wrap: wrap; gap: var(--s-sm) var(--s-lg); list-style: none;
	padding: 0; margin: var(--s-xl) 0 0;
}
.hero-badges li {
	display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; color: #E7EAEE;
}
.hero-badges svg { color: var(--c-amber); flex: none; }
.page-hero { min-height: 0; padding: var(--s-2xl) 0; }
@media (min-width: 960px) { .page-hero { padding: var(--s-3xl) 0; } }
.page-hero h1 { font-size: var(--fs-h1); max-width: none; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: var(--s-lg); grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
	.grid--3 { grid-template-columns: repeat(3, 1fr); }
	.grid--4 { grid-template-columns: repeat(4, 1fr); }
}
.card {
	background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius);
	padding: var(--s-lg); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
	display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(28,31,36,.08), 0 16px 32px rgba(28,31,36,.10); }
.card p { color: var(--c-muted); }
.card .link-arrow { margin-top: auto; }
.icon-box {
	width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--radius);
	background: var(--c-charcoal); color: var(--c-amber); margin-bottom: var(--s-md);
}
.link-arrow {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
	font-family: var(--f-head); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	color: var(--c-charcoal); text-decoration: none;
}
.link-arrow:hover { color: var(--c-amber-dark); }
.card--cta { background: var(--c-amber); border-color: var(--c-amber); }
.card--cta h3, .card--cta p { color: var(--c-charcoal); }

/* trust */
.trust-item { display: flex; gap: var(--s-md); align-items: flex-start; }
.trust-item .icon-box { background: rgba(245,161,0,.12); flex: none; margin: 0; }
.trust-item p { margin: 0; }

/* projects */
.project-card {
	position: relative; display: block; border-radius: var(--radius); overflow: hidden;
	aspect-ratio: 4 / 3; background: var(--c-steel); text-decoration: none; color: var(--c-white);
}
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project-card:hover img { transform: scale(1.04); }
.project-card__body {
	position: absolute; inset: auto 0 0 0; padding: var(--s-lg);
	background: linear-gradient(180deg, transparent, rgba(28,31,36,.9));
}
.project-card h3 { color: var(--c-white); margin: 0; }
.tag {
	display: inline-block; background: var(--c-amber); color: var(--c-charcoal);
	font-family: var(--f-head); font-weight: 600; font-size: 13px; letter-spacing: .1em;
	text-transform: uppercase; padding: 4px 8px; border-radius: 2px; margin-bottom: var(--s-sm);
}
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--s-sm); margin-bottom: var(--s-xl); }
.filter-bar button {
	min-height: 44px; padding: 0 var(--s-md); border: 1px solid var(--c-border); background: var(--c-white);
	border-radius: var(--radius); font-family: var(--f-head); font-weight: 600; font-size: 15px;
	letter-spacing: .06em; text-transform: uppercase; cursor: pointer; color: var(--c-charcoal);
}
.filter-bar button[aria-pressed="true"] { background: var(--c-charcoal); color: var(--c-white); border-color: var(--c-charcoal); }
.project-card[hidden] { display: none; }

/* testimonials */
.testimonial blockquote { margin: 0 0 var(--s-lg); font-size: 17px; color: var(--c-text); }
.stars { display: flex; gap: 2px; color: var(--c-amber); margin-bottom: var(--s-md); }
.testimonial cite { font-style: normal; font-weight: 600; color: var(--c-charcoal); display: block; margin-top: auto; }
.testimonial cite span { display: block; font-weight: 400; color: var(--c-muted); font-size: 14px; }

/* CTA band */
.cta-band { background: var(--c-amber); padding: var(--s-2xl) 0; }
.cta-band__inner { display: flex; flex-direction: column; gap: var(--s-lg); }
.cta-band h2 { margin: 0; font-size: var(--fs-h1); }
.cta-band p { margin: var(--s-sm) 0 0; color: var(--c-charcoal); font-size: var(--fs-body-lg); }
.cta-band .tel { font-weight: 700; text-decoration: none; }
@media (min-width: 960px) {
	.cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Services page ---------- */
.service-block { display: grid; gap: var(--s-xl); align-items: center; padding: var(--s-2xl) 0; border-bottom: 1px solid var(--c-border); }
.service-block:last-child { border-bottom: 0; }
.service-block__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--c-steel); }
.service-block__media img { width: 100%; height: 100%; object-fit: cover; }
.service-block ul { padding-left: 0; list-style: none; margin: 0 0 var(--s-lg); }
.service-block li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: var(--s-sm); }
.service-block li svg { color: var(--c-amber); flex: none; margin-top: 4px; }
@media (min-width: 960px) {
	.service-block { grid-template-columns: 1fr 1fr; gap: var(--s-2xl); }
	.service-block:nth-child(even) .service-block__media { order: 2; }
}
.service-nav { display: flex; gap: var(--s-sm); overflow-x: auto; padding-bottom: var(--s-sm); margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); -webkit-overflow-scrolling: touch; }
.service-nav a { flex: none; }

/* ---------- About ---------- */
.split { display: grid; gap: var(--s-xl); align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s-2xl); } }
.split__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--c-steel); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-lg); margin-top: var(--s-xl); }
@media (min-width: 960px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat strong { display: block; font-family: var(--f-head); font-size: 44px; font-weight: 800; color: var(--c-amber); line-height: 1; }
.stat span { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.team-card { text-align: left; padding: 0; overflow: hidden; }
.team-card img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: var(--c-steel); }
.team-card__body { padding: var(--s-lg); }
.team-card__body p { margin: 0; }
.role { color: var(--c-amber-dark); font-family: var(--f-head); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; margin-bottom: var(--s-sm) !important; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: var(--s-xl); }
@media (min-width: 960px) { .contact-layout { grid-template-columns: 1.4fr 1fr; gap: var(--s-2xl); } }
.form-card { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--s-lg); box-shadow: var(--shadow); }
@media (min-width: 600px) { .form-card { padding: var(--s-xl); } }
.form-grid { display: grid; gap: var(--s-md); }
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; font-size: 14px; color: var(--c-charcoal); margin-bottom: 6px; }
.field .req { color: #B42318; }
.field input, .field select, .field textarea {
	width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--c-text);
	background: var(--c-white); border: 1px solid #CFCCC3; border-radius: var(--radius);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--c-amber); outline-offset: 0; border-color: var(--c-amber); }
.hp-field { position: absolute; left: -9999px; }
.form-note { font-size: 14px; color: var(--c-muted); margin: var(--s-md) 0 0; }
.notice { padding: var(--s-md); border-radius: var(--radius); margin-bottom: var(--s-lg); font-weight: 500; }
.notice--ok { background: #E8F5EC; color: #14532D; border: 1px solid #A7D8B5; }
.notice--err { background: #FDECEC; color: #7A1A1A; border: 1px solid #F3B5B5; }
.contact-list { list-style: none; padding: 0; margin: 0 0 var(--s-xl); }
.contact-list li { display: flex; gap: var(--s-md); align-items: flex-start; padding: var(--s-md) 0; border-bottom: 1px solid var(--c-border); }
.contact-list .icon-box { width: 48px; height: 48px; margin: 0; flex: none; }
.contact-list strong { display: block; font-family: var(--f-head); text-transform: uppercase; letter-spacing: .06em; color: var(--c-charcoal); }
.contact-list a { text-decoration: none; font-weight: 500; word-break: break-word; }
.contact-list a:hover { color: var(--c-amber-dark); }
.contact-list address { font-style: normal; }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-border); aspect-ratio: 4 / 3; background: var(--c-border); }
@media (min-width: 960px) { .map-wrap--wide { aspect-ratio: 21 / 8; } }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Generic page content ---------- */
.entry-content { max-width: 760px; }
.entry-content a { color: var(--c-amber-dark); }

/* ---------- Footer ---------- */
.site-footer { background: #15171B; color: var(--c-on-dark-muted); padding: var(--s-2xl) 0 0; font-size: 15px; }
.footer-grid { display: grid; gap: var(--s-xl); }
@media (min-width: 600px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; } }
.site-footer h3 { color: var(--c-white); font-size: 18px; letter-spacing: .08em; margin-bottom: var(--s-md); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.site-footer a:hover { color: var(--c-amber); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.footer-contact svg { color: var(--c-amber); flex: none; margin-top: 3px; }
.footer-contact address { font-style: normal; }
.footer-contact a { min-height: 0 !important; word-break: break-word; }
.socials { display: flex; gap: var(--s-sm); margin-top: var(--s-lg); }
.socials a {
	width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius);
	background: rgba(255,255,255,.06); color: var(--c-white);
}
.socials a:hover { background: var(--c-amber); color: var(--c-charcoal); }
.footer-bottom {
	margin-top: var(--s-2xl); padding: var(--s-lg) 0; border-top: 1px solid rgba(255,255,255,.08);
	display: flex; flex-direction: column; gap: var(--s-sm); font-size: 14px;
}
@media (min-width: 600px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.site-footer .logo { margin-bottom: var(--s-md); }

/* Sticky mobile call bar */
.mobile-cta {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr;
	box-shadow: 0 -4px 16px rgba(0,0,0,.15);
}
.mobile-cta a { min-height: 56px; border-radius: 0; }
body { padding-bottom: 56px; }
@media (min-width: 960px) { .mobile-cta { display: none; } body { padding-bottom: 0; } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
