/*
Theme Name: Spanwork Scaffold
Description: A responsive English-language catalogue theme for scaffolding and formwork.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: spanwork-scaffold
*/

:root {
  color-scheme: light;
  --ink: #182b38;
  --night: #10222f;
  --muted: #475d6a;
  --paper: #fcfcfa;
  --mist: #eaf0f2;
  --line: #ced8dc;
  --orange: #ffc06c;
  --deep-orange: #8f4100;
  font: 100%/1.55 "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
body { min-width: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #a24a00; outline-offset: 4px; }
.wrap { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }
.section { padding-block: 68px; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 10; transform: translateY(-170%); background: white; padding: 12px; }
.skip:focus { transform: none; }
h1, h2, h3 { font-family: "Segoe UI", Arial, sans-serif; font-weight: 750; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); letter-spacing: -.064em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.55rem); letter-spacing: -.045em; }
h3 { font-size: 1.2rem; letter-spacing: -.022em; }
p { color: var(--muted); }

.site-header { position: relative; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row, .nav { display: flex; align-items: center; }
.header-row { min-height: 78px; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.6rem; letter-spacing: -.06em; line-height: 1; }
.brand-mark { display: grid; place-items: center; position: relative; width: 29px; height: 31px; border: 2px solid currentColor; border-left-width: 3px; border-right-width: 3px; }
.brand-mark i { position: absolute; width: 23px; height: 2px; background: currentColor; }
.brand-mark i:nth-child(1) { top: 7px; }
.brand-mark i:nth-child(2) { bottom: 7px; }
.brand-mark i:nth-child(3) { width: 24px; transform: rotate(-47deg); background: #b45811; }
.nav { gap: clamp(12px, 2vw, 30px); }
.nav > a:not(.button), .nav summary { text-decoration: none; font-weight: 650; white-space: nowrap; font-size: .93rem; }
.nav a:hover, .nav summary:hover { color: var(--deep-orange); }
.nav .button:hover { color: var(--ink); }
.nav summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid; border-bottom: 2px solid; transform: translateY(-2px) rotate(45deg); }
.nav-search { width: 30px; height: 32px; display: grid; place-items: center; }
.nav-search span { position: relative; border: 2px solid currentColor; border-radius: 50%; width: 14px; height: 14px; }
.nav-search span::after { content: ""; position: absolute; width: 7px; height: 2px; background: currentColor; transform: rotate(45deg); top: 11px; left: 9px; }
.dropdown { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); width: min(1060px, calc(100% - 80px)); padding: 24px 30px 28px; background: white; border: 1px solid var(--line); box-shadow: 0 18px 36px #132d3a20; }
.menu-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.dropdown a { display: block; text-decoration: none; padding-block: 4px; }
.dropdown .all-products { font-weight: 750; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.menu-groups strong { display: block; margin-bottom: 5px; }
.menu-toggle { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border: 1px solid transparent; border-radius: 3px; font-weight: 750; text-decoration: none; text-align: center; line-height: 1.25; }
.primary { color: var(--night); background: var(--orange); }
.primary:hover { background: #ffab45; }
.outline { color: white; border-color: #c9d4db; }
.outline:hover { background: #ffffff25; }
.secondary { color: var(--ink); background: white; border-color: var(--line); }
.secondary:hover { background: var(--mist); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { color: var(--deep-orange); font-weight: 750; text-underline-offset: .2em; }
.text-link span { margin-left: .25em; }

.hero { position: relative; isolation: isolate; color: white; background: var(--night); }
.hero img { position: absolute; inset: 0 0 0 auto; width: 75%; height: 100%; object-fit: cover; object-position: 58% 50%; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #10222f 22%, #10222fed 34%, #10222f85 56%, #10222f15 83%); z-index: -1; }
.hero-content { display: grid; align-content: center; min-height: clamp(455px, 45vw, 650px); padding-block: 68px; }
.hero h1 { max-width: 11ch; }
.hero p { color: #eef2f4; max-width: 39ch; margin: 22px 0 30px; font-size: clamp(1.04rem, 1.7vw, 1.22rem); }
.hero :focus-visible, .site-footer :focus-visible, .quote-band :focus-visible { outline-color: var(--orange); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.category-card { background: white; border: 1px solid var(--line); }
.category-card a, .item a { height: 100%; display: flex; flex-direction: column; text-decoration: none; }
.category-card a:hover .text-link, .item a:hover .text-link { text-decoration: underline; }
.category-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--mist); }
.card-copy { padding: 19px 17px; display: flex; flex-direction: column; flex: 1; }
.card-copy p, .item p { margin-block: 8px 14px; }
.card-copy .text-link, .item .text-link { margin-top: auto; font-size: .93rem; }
.feature { background: var(--mist); padding-block: 64px; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 42px; }
.feature-grid > div:first-child p { margin-block: 13px 16px; max-width: 38ch; }
.ruled-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; }
.ruled-grid article { border-top: 1px solid #95a9b3; padding-top: 12px; }
.ruled-grid p { margin-top: 8px; }
.large { gap: 34px; }
.quote-band { background: var(--night); color: white; padding-block: 44px; }
.quote-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.quote-band p { color: #d0dce2; margin-top: 8px; }
.site-footer { background: #142a38; color: white; padding-block: 46px; border-top: 1px solid #425965; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 24px; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.footer-grid strong { margin-bottom: 3px; }
.footer-grid p, .footer-grid a:not(.brand) { color: #d0dce2; }
.footer-grid a:not(.brand) { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }

.page-intro { background: var(--mist); border-bottom: 1px solid var(--line); padding-block: 35px 42px; }
.page-intro h1 { font-size: clamp(2.3rem, 5.8vw, 4.2rem); margin-block: 19px 12px; }
.page-intro p { font-size: 1.1rem; max-width: 64ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 7px; font-size: .9rem; align-items: center; }
.crumbs a { color: var(--muted); text-underline-offset: .17em; }
.crumbs a::after { content: "/"; display: inline-block; padding-left: 7px; }
.item-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.item { background: white; border: 1px solid var(--line); }
.item a { padding: 18px; }
.item h2 { font-size: 1.4rem; }
.filter { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; padding: 18px; border: 1px solid var(--line); background: white; }
label { display: block; font-weight: 650; }
input, select, textarea { display: block; width: 100%; background: white; color: var(--ink); border: 1px solid #81949e; border-radius: 2px; padding: 9px 11px; margin-top: 5px; min-height: 46px; }
textarea { resize: vertical; }
.result-count { margin-top: 14px; }
.catalog-group { margin-top: 34px; }
.catalog-group h2, .related h2, .category-layout h2 { margin-bottom: 16px; }
.catalog-group h2 a { text-underline-offset: .15em; text-decoration-thickness: 1px; }
#no-results { margin-top: 20px; }
.category-layout, .product-layout, .contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 36px; align-items: start; }
.category-layout .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
figure img { width: 100%; height: auto; background: var(--mist); }
figcaption { color: var(--muted); font-size: .875rem; margin-top: 7px; }
.product-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.specs { margin-block: 14px 22px; }
.specs > div { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(0, 1.3fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
dt { font-weight: 700; }
dd { color: var(--muted); }
.related { padding-top: 0; }
.reading h2, .reading p { max-width: 70ch; }
.reading p { margin-block: 10px 27px; }
.contact-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.contact-layout ul { padding-left: 1.2em; color: var(--muted); }
.quote-form { display: grid; gap: 16px; padding: 24px; background: white; border: 1px solid var(--line); }
.quote-form label span { color: var(--deep-orange); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-note, #quote-status { font-size: .9rem; }
#quote-status:empty { display: none; }

@media (max-width: 980px) {
  .wrap { width: calc(100% - 48px); }
  .header-row { min-height: 65px; }
  .menu-toggle { display: inline-flex; background: white; color: var(--ink); border: 1px solid var(--line); padding: 6px 14px; min-height: 40px; align-items: center; }
  .nav { display: none; position: absolute; top: 100%; inset-inline: 0; padding: 16px 24px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .menu-toggle[aria-expanded="true"] + .nav { display: flex; flex-direction: column; align-items: stretch; gap: 14px; max-height: calc(100dvh - 65px); overflow-y: auto; }
  .nav .button { align-self: start; }
  .dropdown { position: static; transform: none; width: 100%; box-shadow: none; margin-top: 10px; padding: 14px; }
  .menu-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section, .feature { padding-block: 42px; }
  .related { padding-top: 0; }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .hero img { width: 100%; object-position: 64% center; }
  .hero::after { background: linear-gradient(90deg, #10222ff0, #10222f84), linear-gradient(0deg, #10222faa, transparent); }
  .hero-content { min-height: 430px; padding-block: 45px; }
  .section-head { flex-direction: column; gap: 7px; }
  .feature-grid, .product-layout, .category-layout, .contact-layout { grid-template-columns: 1fr; gap: 24px; }
  .item-grid, .category-layout .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter { grid-template-columns: 1fr; }
  .filter .button { justify-self: start; }
  .quote-band .wrap { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .fields, .ruled-grid, .item-grid, .category-layout .item-grid { grid-template-columns: 1fr; }
  .category-grid { gap: 10px; }
  .card-copy { padding: 13px 10px; }
  .quote-form { padding: 16px; }
}


.custom-logo-link { display: inline-block; flex-shrink: 0; }
.custom-logo { width: auto; height: auto; max-width: min(180px, 50vw); max-height: 50px; }
.site-footer .custom-logo { background: white; padding: 5px; }
.reading .post, .reading .page { margin-block-end: 30px; overflow-wrap: anywhere; }
.reading .wp-post-image, .reading figure { margin-block: 16px; }
.reading a { text-underline-offset: .16em; }
