/* SolidArc theme — black and charcoal, neon pink and green, blocky packaging-inspired panels.
   Colours, fonts and widths come from theme.json; this file holds layout chrome and block styles. */

:root {
	--black: var(--wp--preset--color--black, #0A0A0C);
	--charcoal: var(--wp--preset--color--charcoal, #131418);
	--charcoal-2: var(--wp--preset--color--charcoal-2, #1A1C21);
	--charcoal-3: #23262C;
	--line: var(--wp--preset--color--line, #2B2E35);
	--text: var(--wp--preset--color--body-text, #C8CAD1);
	--bright: var(--wp--preset--color--bright, #F2F3F5);
	--muted: var(--wp--preset--color--muted, #8A8D97);
	--pink: var(--wp--preset--color--pink, #FF2E88);
	--pink-hi: #FF5AA2;
	--green: var(--wp--preset--color--green, #3DFF8B);
	--screen: #040806;
	--display: var(--wp--preset--font-family--display, "Michroma", sans-serif);
	--body: var(--wp--preset--font-family--body, "Barlow Semi Condensed", sans-serif);
	--cut: 24px;
	--wrap: 1180px;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--section-pad: clamp(4rem, 8vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
img, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
::selection { background: var(--pink); color: var(--black); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--green); color: var(--black); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Headings inside a block with its own text colour follow that colour (e.g. black text on a pink band). */
.has-text-color :where(h1, h2, h3, h4, h5, h6, .wp-block-heading) { color: inherit; }
.has-text-color a:where(:not(.wp-block-button__link)) { color: inherit; }

/* ---------- Buttons (theme buttons and block buttons share one look) ---------- */
.btn, .wp-block-button__link {
	--cut: 12px;
	display: inline-flex; align-items: center; justify-content: center;
	font-family: var(--body); font-weight: 600; font-size: 1.05rem; line-height: 1;
	text-decoration: none;
	clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
	transition: background-color .15s ease, color .15s ease;
}
.btn { padding: 1rem 1.6rem 1rem 1.4rem; background: var(--pink); color: var(--black); }
.btn:hover { background: var(--pink-hi); color: var(--black); }
.btn:active, .wp-block-button__link:active { transform: translateY(1px); }
.btn-small { padding: .7rem 1.2rem .7rem 1rem; font-size: .98rem; --cut: 9px; }

.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
	clip-path: none; background: transparent; color: var(--bright);
	border: 0; box-shadow: inset 0 0 0 1px var(--line);
	padding: 1rem 1.6rem 1rem 1.4rem;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.wp-block-button.is-style-ink .wp-block-button__link { background: var(--black); color: var(--bright); }
.wp-block-button.is-style-ink .wp-block-button__link:hover { background: var(--charcoal-3); color: var(--bright); }
.wp-block-buttons { gap: 1rem; }

/* ---------- Masthead ---------- */
.masthead {
	position: sticky; top: 0; z-index: 50;
	background: rgba(10, 10, 12, .85);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar .masthead { top: 46px; } }
@media (max-width: 600px) { .admin-bar .masthead { top: 0; } }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 84px; }
.custom-logo-link { display: block; line-height: 0; }
.masthead .custom-logo { width: auto; height: 52px; }
.brand-text { font-family: var(--display); color: var(--bright); text-decoration: none; font-size: 1.25rem; letter-spacing: .04em; }
.site-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 1.6rem; margin: 0; padding: 0; }
.nav-list a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; font-size: 1.05rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav-list a:not(.btn):hover { border-bottom-color: var(--green); color: var(--bright); }
.nav-list li.button { margin-left: .4rem; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
	.masthead .custom-logo { height: 42px; }
	.nav-toggle {
		display: inline-flex; align-items: center; gap: .6rem;
		font: 600 1rem var(--body); color: var(--bright);
		background: var(--charcoal); border: 1px solid var(--line); padding: .55rem .8rem; cursor: pointer;
	}
	.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--green); position: relative; }
	.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
	.site-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch;
		background: var(--charcoal); border-bottom: 1px solid var(--line); padding: 1rem var(--gutter) 1.5rem;
	}
	.site-nav.is-open { display: flex; }
	.nav-list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-list a:not(.btn) { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); }
	.nav-list li.button { margin: 1rem 0 0; }
}
@media (max-width: 420px) { .masthead .custom-logo { height: 36px; } }

/* ---------- Page canvas ---------- */
.site-main--canvas .entry-content > .alignfull { margin-block: 0; }
.site-main--canvas .entry-content > .alignfull + .alignfull { margin-block-start: 0; }
:where(.wp-block-group.alignfull, .wp-block-group.is-style-section, .wp-block-group.is-style-section-alt, .wp-block-group.is-style-hero)[id] { scroll-margin-top: 84px; }

/* ---------- Block styles: sections ---------- */
.wp-block-group.is-style-section,
.wp-block-group.is-style-section-alt,
.wp-block-group.is-style-hero { padding-block: var(--section-pad); }
.wp-block-group.is-style-section-alt:not(.has-background) { background: var(--charcoal); }
.wp-block-group.is-style-section-alt { border-block: 1px solid var(--line); }
.wp-block-group.is-style-hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 8vw, 7rem); border-bottom: 1px solid var(--line); }
.wp-block-group.is-style-hero h1 { max-width: 19ch; }
.wp-block-group.is-style-hero .wp-block-columns { gap: clamp(2.5rem, 6vw, 5.5rem); }

/* ---------- Block styles: paragraphs ---------- */
p.is-style-lede { font-size: var(--wp--preset--font-size--large, 1.3rem); color: var(--muted); max-width: 52ch; }
/* In a full-width section, keep a narrow lede aligned to the content's left edge instead of centred. */
.is-layout-constrained > p.is-style-lede {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 1180px)) / 2)) !important;
	margin-right: auto !important;
}
.has-text-color p.is-style-lede, p.is-style-lede.has-text-color { color: inherit; }
p.is-style-label { color: var(--pink); font-weight: 600; margin-block: .35rem .8rem; }
p.is-style-readout {
	display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
	padding: .9rem 1.1rem; background: var(--black); color: var(--muted);
	box-shadow: inset 0 0 0 1px var(--line);
}
p.is-style-readout strong { font-family: var(--display); font-weight: 400; font-size: .98rem; color: var(--bright); text-align: right; }
p.is-style-barcode {
	display: flex; justify-content: flex-end; align-items: flex-end; gap: 1rem;
	padding: 1.1rem 1.6rem 1.3rem; margin: 0; border-top: 1px solid var(--line);
	font-family: var(--display); font-size: .78rem; color: var(--muted);
}
p.is-style-barcode::before {
	content: ""; margin-right: auto; width: 150px; height: 34px; flex: none;
	background: repeating-linear-gradient(90deg,
		var(--bright) 0 4px, transparent 4px 6px, var(--bright) 6px 8px, transparent 8px 14px,
		var(--bright) 14px 16px, transparent 16px 20px, var(--bright) 20px 26px, transparent 26px 28px,
		var(--bright) 28px 30px, transparent 30px 36px);
}

/* ---------- Block styles: lists ---------- */
ul.is-style-squares, ul.is-style-dashes { list-style: none; padding-left: 0; }
ul.is-style-squares li, ul.is-style-dashes li { position: relative; padding: .55rem 0 .55rem 1.5rem; border-top: 1px solid var(--line); }
ul.is-style-squares li::before { content: ""; position: absolute; left: 0; top: 1.1rem; width: 7px; height: 7px; background: var(--pink); }
ul.is-style-dashes li::before { content: ""; position: absolute; left: 0; top: 1.25rem; width: .7rem; height: 2px; background: var(--green); }
.is-style-panel-green ul.is-style-squares li::before { background: var(--green); }

/* ---------- Block styles: panels ---------- */
.wp-block-group:where(.is-style-panel, .is-style-panel-pink, .is-style-panel-green) {
	--pad: clamp(1.4rem, 3vw, 1.8rem);
	display: flex; flex-direction: column;
	padding: var(--pad);
	background: var(--charcoal);
	box-shadow: inset 0 0 0 1px var(--line);
	clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.wp-block-group:where(.is-style-panel-pink, .is-style-panel-green) > .wp-block-heading:first-child {
	margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 1.4rem;
	padding: 1.2rem var(--pad);
	background: var(--pink); color: var(--black);
	font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}
.wp-block-group.is-style-panel-green > .wp-block-heading:first-child { background: var(--green); }
.wp-block-group:where(.is-style-panel-pink, .is-style-panel-green) > .wp-block-heading:first-child + p { color: var(--muted); font-size: 1.15rem; margin-top: 0; }
.wp-block-group:where(.is-style-panel, .is-style-panel-pink, .is-style-panel-green) > p.is-style-readout:last-child { margin-top: auto; }
.wp-block-group:where(.is-style-panel, .is-style-panel-pink, .is-style-panel-green) > ul:has(+ p.is-style-readout:last-child) { margin-bottom: 2rem; }
.wp-block-column > .wp-block-group:where(.is-style-panel, .is-style-panel-pink, .is-style-panel-green):only-child { height: 100%; }
.wp-block-group.is-style-panel { border-top: 4px solid var(--green); clip-path: none; }
.wp-block-group.is-style-panel > .wp-block-heading:first-child { font-size: 1.02rem; }

/* ---------- Block styles: spec sheet (the side of a product box) ---------- */
.wp-block-group.is-style-spec-sheet {
	--cut: 32px;
	padding: 0;
	background: var(--charcoal);
	box-shadow: inset 0 0 0 1px var(--line);
	clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.wp-block-group.is-style-spec-sheet > * { margin-block: 0; }
.wp-block-group.is-style-spec-head {
	display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.2rem; row-gap: .45rem;
	padding: 1.4rem 1.6rem;
	background: var(--pink); color: var(--black);
}
.wp-block-group.is-style-spec-head > * { margin: 0; }
.wp-block-group.is-style-spec-head > .wp-block-heading { flex-basis: 100%; font-size: 2.1rem; line-height: 1; color: var(--black); }
.wp-block-group.is-style-spec-head > .wp-block-image { flex: none; width: 64px; }
.wp-block-group.is-style-spec-head > .wp-block-image + .wp-block-heading { flex-basis: auto; }
.wp-block-group.is-style-spec-head > p { flex-basis: 100%; font-weight: 600; line-height: 1.25; }

figure.wp-block-table.is-style-spec { margin: 0; overflow-x: visible; }
.wp-block-table.is-style-spec table { width: 100%; border-collapse: collapse; }
.wp-block-table.is-style-spec td, .wp-block-table.is-style-spec th { border: 0; border-top: 1px solid var(--line); padding: .85rem 1.6rem; text-align: left; vertical-align: top; }
.wp-block-table.is-style-spec tr:first-child td { border-top: 0; }
.wp-block-table.is-style-spec td:first-child { color: var(--muted); width: 9rem; padding-right: .5rem; }
.wp-block-table.is-style-spec td:last-child { color: var(--bright); font-weight: 500; }
.wp-block-table.is-style-spec figcaption { display: none; }
.wp-block-table.is-style-spec mark { background: none; }

/* One orchestrated moment: the spec sheet prints in on load. */
@media (prefers-reduced-motion: no-preference) {
	.js .is-style-spec-sheet > *, .js .is-style-spec-sheet tr { animation: print-in .5s cubic-bezier(.2,.7,.2,1) both; }
	.js .is-style-spec-sheet > *:first-child { animation-delay: .1s; }
	.js .is-style-spec-sheet tr:nth-child(1) { animation-delay: .25s; }
	.js .is-style-spec-sheet tr:nth-child(2) { animation-delay: .33s; }
	.js .is-style-spec-sheet tr:nth-child(3) { animation-delay: .41s; }
	.js .is-style-spec-sheet tr:nth-child(4) { animation-delay: .49s; }
	.js .is-style-spec-sheet tr:nth-child(n+5) { animation-delay: .57s; }
	.js .is-style-spec-sheet > .wp-block-table { animation: none; }
	.js .is-style-spec-sheet > *:last-child:not(:first-child) { animation-delay: .65s; }
}
@keyframes print-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* ---------- Block styles: numbered steps ---------- */
.wp-block-columns.is-style-steps { gap: 4px; counter-reset: step; }
.wp-block-columns.is-style-steps > .wp-block-column { counter-increment: step; background: var(--charcoal-2); padding: 2rem 1.8rem 1.8rem; }
.wp-block-columns.is-style-steps > .wp-block-column::before {
	content: counter(step, decimal-leading-zero);
	display: block; font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--green); margin-bottom: 1.6rem;
}
.wp-block-columns.is-style-steps > .wp-block-column > * + * { margin-block-start: .6rem; }
.wp-block-columns.is-style-steps > .wp-block-column > .wp-block-heading { font-size: 1.3rem; }

/* ---------- Images and the portfolio query loop ---------- */
.is-style-chamfer img, img.is-style-chamfer, .wp-block-post-featured-image.is-style-chamfer {
	--cut: 20px;
	clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.wp-block-post-template .wp-block-post-featured-image { margin-bottom: 1.2rem; background: var(--charcoal-2); }
.wp-block-post-template .wp-block-post-featured-image img { width: 100%; object-fit: cover; }
.wp-block-post-template .wp-block-post-title { font-size: 1.15rem; }
.wp-block-post-template .wp-block-post-title a { color: var(--bright); text-decoration: none; }
.wp-block-post-template .wp-block-post-title a:hover { color: var(--green); }
.wp-block-post-template .wp-block-post-excerpt__more-text { display: none; }
.wp-block-post-template > li { padding-top: 1.4rem; border-top: 3px solid var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--muted); border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; padding-block: 3.5rem 2.5rem; }
.footer-brand .custom-logo { height: 46px; width: auto; margin-bottom: 1.2rem; }
.footer-brand .brand-text { display: inline-block; margin-bottom: 1rem; }
.footer-brand p { max-width: 40ch; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--green); }
.footer-links { display: grid; justify-items: end; align-content: start; gap: .5rem; text-align: right; }
.footer-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .5rem; justify-items: end; }
.site-footer .widget { margin-bottom: 1.2rem; }
.site-footer .widget-title,
.site-footer .widget :is(h1, h2, h3, h4, h5, h6) { font: 600 1rem/1.3 var(--body); color: var(--bright); margin: 0 0 .5rem; letter-spacing: 0; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer .widget p { margin: 0 0 .5rem; }
.footer-legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.5rem; margin: 0; font-size: .95rem; }

/* ---------- Inner pages, posts, archives ---------- */
/* Text pages read in a comfortable column; wide and full-width blocks can still break out. */
.entry-content--reading { --wp--style--global--content-size: 760px; }
.site-main:not(.site-main--canvas) { padding-bottom: 5rem; }
.page-head { padding-block: clamp(3rem, 6vw, 5rem) 1rem; }
.page-head .page-title { max-width: 24ch; }
.page-meta { color: var(--muted); }
.work-client { color: var(--green); font-weight: 600; margin-bottom: .6rem; }
.project-hero { margin: 0 0 2rem; }
.project-hero img { width: 100%; }
.entry-content blockquote { margin: 1.5em 0; padding: .4em 0 .4em 1.4em; border-left: 3px solid var(--pink); font-size: 1.25rem; color: var(--bright); }
.entry-content pre { background: var(--charcoal); padding: 1.2rem 1.4rem; overflow-x: auto; box-shadow: inset 0 0 0 1px var(--line); }
.back { margin-top: 3rem; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); }
.work-card { border-top: 3px solid var(--green); padding-top: 1.4rem; }
.work-media { display: block; margin-bottom: 1.2rem; --cut: 20px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.work-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.work-title { font-size: 1.15rem; margin: 0 0 .6rem; }
.work-title a { color: var(--bright); text-decoration: none; }
.work-title a:hover { color: var(--green); }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; max-width: 820px; }
.post-list li { background: var(--charcoal); box-shadow: inset 0 0 0 1px var(--line); padding: 1.6rem 1.8rem; }
.post-list h2 { font-size: 1.25rem; margin: 0 0 .4rem; }
.post-list h2 a { color: var(--bright); text-decoration: none; }
.pagination { padding-top: 2rem; }
.entry-after { padding-top: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 781px) {
	.wp-block-columns.is-style-steps { gap: 4px; }
}
@media (max-width: 720px) {
	.work-grid { grid-template-columns: 1fr; }
	p.is-style-readout { flex-direction: column; gap: .3rem; }
	p.is-style-readout strong { text-align: left; }
	.wp-block-table.is-style-spec td { padding-inline: 1.2rem; }
	.wp-block-table.is-style-spec td:first-child { width: 7rem; }
	.wp-block-group.is-style-spec-head, p.is-style-barcode { padding-inline: 1.2rem; }
	.footer-inner { grid-template-columns: 1fr; }
	.footer-links, .footer-list { justify-items: start; text-align: left; }
}
