:root {
  --ink: #10181c;
  --ink-2: #1c292f;
  --steel: #56656b;
  --yellow: #ffbf17;
  --yellow-2: #d99b00;
  --paper: #ffffff;
  --concrete: #eef1ef;
  --line: #d4dcda;
  --blue: #176f88;
  --page: min(1200px, calc(100% - 40px));
  --shadow: 0 22px 58px rgba(16, 24, 28, 0.14);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", Arial, sans-serif; font-size: 16px; line-height: 1.58; }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; width: 100%; max-width: 100%; }
.shell { width: var(--page); margin-inline: auto; }

.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.utility-bar { color: #eef3f1; background: var(--ink); font-size: 0.8rem; }
.utility-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.utility-inner > div { display: flex; gap: 22px; }
.utility-bar a { text-decoration: none; }
.utility-bar a:hover, .utility-bar a:focus-visible { color: var(--yellow); }

.site-header { position: sticky; top: 0; z-index: 25; border-bottom: 1px solid rgba(16, 24, 28, 0.1); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px); }
.header-inner { min-height: 82px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 30px; }
.brand { width: fit-content; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; color: var(--yellow); background: var(--ink); border-radius: 5px 5px 16px 5px; font-family: "Manrope", Arial, sans-serif; font-size: 1.55rem; font-weight: 800; }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-family: "Manrope", Arial, sans-serif; font-size: 1.05rem; font-weight: 800; letter-spacing: 0.08em; line-height: 1; }
.brand-copy small { margin-top: 5px; color: var(--steel); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; }
.main-nav { display: flex; align-items: center; gap: 25px; }
.main-nav a { color: #39484e; font-size: 0.875rem; font-weight: 700; text-decoration: none; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--blue); }

.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 19px; border: 1px solid transparent; border-radius: 5px; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .category-grid button:focus-visible, .add-button:focus-visible, .quantity-button:focus-visible, .qty-input:focus-visible, .close-button:focus-visible, .field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible, .remove-item:focus-visible, .basket-summary-heading button:focus-visible { outline: 3px solid rgba(255, 191, 23, 0.5); outline-offset: 2px; }
.button-dark { color: #fff; background: var(--ink); border-color: var(--ink); }
.button-dark:hover { background: var(--ink-2); }
.button-yellow { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.button-yellow:hover { background: #ffd152; }
.button-outline { color: var(--ink); background: transparent; border-color: #8d999e; }

.hero { position: relative; overflow: hidden; color: #fff; background: var(--ink); }
.hero::before { position: absolute; inset: 0; content: ""; opacity: 0.17; background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(90deg, #000, transparent 70%); }
.hero-grid { position: relative; min-height: 640px; display: grid; grid-template-columns: 0.93fr 1.07fr; align-items: center; gap: 70px; padding-block: 72px; }
.eyebrow { margin: 0 0 13px; color: var(--blue); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.eyebrow.light { color: var(--yellow); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Manrope", Arial, sans-serif; line-height: 1.08; }
h1 { margin-bottom: 24px; font-size: clamp(3.25rem, 6.6vw, 6.1rem); font-weight: 800; letter-spacing: -0.06em; }
h1 span { color: var(--yellow); }
h2 { margin-bottom: 14px; font-size: clamp(2rem, 4.1vw, 3.55rem); font-weight: 800; letter-spacing: -0.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 610px; margin-bottom: 29px; color: #c8d2d4; font-size: 1.08rem; }
.hero-actions, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.text-link { font-weight: 800; text-decoration: none; }
.light-link { color: #eaf0ef; }
.light-link span { margin-left: 6px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 11px 22px; margin: 30px 0 0; padding: 0; list-style: none; color: #e5ecea; font-size: 0.86rem; font-weight: 700; }
.hero-points li::before { content: ""; width: 7px; height: 7px; display: inline-block; margin-right: 8px; border-radius: 50%; background: var(--yellow); }

.hero-products { position: relative; display: grid; grid-template-columns: 1.2fr 0.8fr; grid-template-rows: 1fr 1fr; gap: 10px; min-height: 465px; padding: 10px; color: var(--ink); background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22); box-shadow: 24px 24px 0 rgba(23,111,136,.28); }
.hero-product { position: relative; min-width: 0; min-height: 0; margin: 0; overflow: hidden; background: #dfe5e2; }
.hero-product-main { grid-row: 1 / 3; }
.hero-product img { height: 100%; object-fit: cover; }
.hero-product::after { position: absolute; inset: 45% 0 0; content: ""; background: linear-gradient(transparent, rgba(16,24,28,.82)); }
.hero-product figcaption { position: absolute; z-index: 1; right: 17px; bottom: 15px; left: 17px; color: #fff; }
.hero-product figcaption span { display: block; margin-bottom: 2px; color: var(--yellow); font-size: 0.68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hero-product figcaption strong { font-family: "Manrope", Arial, sans-serif; font-size: 1rem; }
.hero-stamp { position: absolute; z-index: 3; right: -18px; bottom: -18px; width: 96px; height: 96px; display: grid; place-content: center; border: 8px solid var(--ink); border-radius: 50%; color: var(--ink); background: var(--yellow); text-align: center; transform: rotate(-7deg); }
.hero-stamp strong { font: 800 1.35rem/1 "Manrope", Arial, sans-serif; }
.hero-stamp span { font-size: .62rem; font-weight: 800; letter-spacing: .12em; }

.category-section, .timber-section { padding: 102px 0; }
.section-heading { display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: 70px; margin-bottom: 42px; }
.section-heading > p { margin-bottom: 7px; color: var(--steel); }
.compact-heading h2 { max-width: 790px; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.category-grid article { min-height: 310px; display: flex; flex-direction: column; padding: 28px 25px; border-right: 1px solid var(--line); background: #fff; transition: background 160ms ease, color 160ms ease; }
.category-grid article:last-child { border-right: 0; }
.category-grid article:hover { color: #fff; background: var(--ink); }
.category-grid article > span { color: var(--blue); font-size: .73rem; font-weight: 800; }
.category-grid article:hover > span { color: var(--yellow); }
.category-grid h3 { margin: 58px 0 13px; font-size: 1.35rem; }
.category-grid p { color: var(--steel); font-size: .92rem; }
.category-grid article:hover p { color: #c8d2d4; }
.category-grid button { width: fit-content; margin-top: auto; padding: 0; border: 0; color: inherit; background: transparent; font-weight: 800; cursor: pointer; }
.category-grid button b { margin-left: 8px; color: var(--blue); }
.category-grid article:hover button b { color: var(--yellow); }

.products-section { padding: 102px 0 116px; color: #fff; background: var(--ink); }
.products-heading > p { color: #c5d0d2; }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.product-card { display: grid; grid-template-columns: 43% 57%; min-height: 340px; overflow: hidden; color: var(--ink); background: #fff; border-radius: 6px 6px 20px 6px; }
.product-image-wrap { position: relative; min-height: 280px; overflow: hidden; background: #dfe4e1; }
.product-image-wrap::before { position: absolute; z-index: 2; top: 14px; left: 14px; content: attr(data-number); padding: 5px 8px; color: #fff; background: rgba(16,24,28,.83); font-size: .69rem; font-weight: 800; }
.product-image { height: 100%; object-fit: cover; transition: transform 300ms ease; }
.product-card:hover .product-image { transform: scale(1.025); }
.product-content { display: flex; flex-direction: column; padding: 28px 25px; }
.product-category { width: fit-content; margin-bottom: 14px; padding: 5px 8px; color: var(--blue); background: #e8f2f3; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.product-content h3 { margin: 0 0 9px; font-size: 1.25rem; }
.product-spec { margin: 0 0 7px; color: var(--steel); }
.product-unit { margin: 0 0 22px; color: #778388; font-size: .79rem; }
.product-controls { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: auto; }
.quantity-control { display: grid; grid-template-columns: 38px 1fr 38px; border: 1px solid var(--line); }
.quantity-button { border: 0; color: var(--ink); background: #f2f4f3; cursor: pointer; font-size: 1.05rem; }
.qty-input { width: 100%; min-width: 0; border: 0; border-inline: 1px solid var(--line); text-align: center; }
.add-button { min-width: 112px; padding: 0 14px; border: 1px solid var(--ink); color: #fff; background: var(--ink); font-weight: 800; cursor: pointer; }
.add-button.is-added { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }

.timber-grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: 78px; align-items: start; }
.timber-heading { position: sticky; top: 120px; }
.timber-heading > p:not(.eyebrow) { margin-bottom: 27px; color: var(--steel); }
.timber-list { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.timber-list article { min-height: 235px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.timber-list article:nth-child(2n) { border-right: 0; }
.timber-list article:nth-last-child(-n + 2) { border-bottom: 0; }
.timber-list span { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.timber-list h3 { margin: 38px 0 11px; font-size: 1.25rem; }
.timber-list p { margin-bottom: 0; color: var(--steel); font-size: .92rem; }

.trade-section { padding: 100px 0; color: #fff; background: var(--blue); }
.trade-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 80px; }
.trade-grid h2 { max-width: 500px; }
.trade-grid ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.32); }
.trade-grid li { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid rgba(255,255,255,.32); }
.trade-grid li > span { color: var(--yellow); font-size: .75rem; font-weight: 800; }
.trade-grid li strong { font: 700 1.1rem/1.2 "Manrope", Arial, sans-serif; }
.trade-grid li p { margin: 5px 0 0; color: #d8e9ec; }

.contact-section { padding: 90px 0; background: var(--concrete); }
.contact-card { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 70px; padding: 58px; color: #fff; background: var(--ink); border-radius: 6px 6px 28px 6px; }
.contact-card p:not(.eyebrow) { max-width: 620px; margin-bottom: 0; color: #c6d0d2; }
.contact-actions { display: grid; gap: 12px; }
.contact-actions > a:not(.button) { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.2); text-decoration: none; }
.contact-actions > a span, .contact-actions > a strong { display: block; }
.contact-actions > a span { color: #9fb0b5; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contact-actions > a strong { margin-top: 2px; }

footer { padding: 42px 0; color: #ced6d7; background: #090f12; }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 34px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.small-mark { width: 39px; height: 39px; font-size: 1.1rem; }
.footer-brand strong { color: #fff; font-family: "Manrope", Arial, sans-serif; }
.footer-brand p { margin: 2px 0 0; font-size: .78rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.footer-links a { font-size: .82rem; font-weight: 700; text-decoration: none; }
.trading-note { max-width: 300px; margin: 0 0 0 auto; font-size: .76rem; text-align: right; }

.basket-bar { position: fixed; z-index: 35; right: 24px; bottom: 24px; min-width: 360px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 15px 14px 20px; color: #fff; background: var(--ink); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; box-shadow: var(--shadow); }
.basket-bar span, .basket-bar strong { display: block; }
.basket-bar span { color: #aebcc0; font-size: .72rem; }

.enquiry-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 7px 7px 24px 7px; background: transparent; }
.enquiry-dialog::backdrop { background: rgba(8,15,18,.76); backdrop-filter: blur(5px); }
.dialog-panel { max-height: calc(100vh - 24px); overflow-y: auto; padding: 34px; background: #fff; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.dialog-heading h2 { font-size: clamp(1.9rem, 5vw, 3rem); }
.close-button { width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: #fff; cursor: pointer; font-size: 1.7rem; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: block; }
.field-wide { grid-column: 1 / -1; }
.field > span { display: block; margin-bottom: 6px; font-size: .82rem; font-weight: 800; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 11px 12px; color: var(--ink); background: #fff; border: 1px solid #aeb8ba; border-radius: 3px; }
.field textarea { min-height: 118px; resize: vertical; }
.basket-summary { margin-top: 24px; padding: 20px; background: var(--concrete); border-left: 5px solid var(--yellow); }
.basket-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.basket-summary-heading span, .basket-summary-heading strong { display: block; }
.basket-summary-heading span { color: var(--steel); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.basket-summary-heading button, .remove-item { padding: 0; border: 0; color: #8f3028; background: transparent; cursor: pointer; font-size: .78rem; font-weight: 800; }
.basket-items { display: grid; gap: 8px; }
.basket-item { display: grid; grid-template-columns: 50px 1fr auto auto; align-items: center; gap: 12px; padding: 8px; background: #fff; }
.basket-item img { width: 50px; height: 50px; object-fit: cover; }
.basket-item-copy strong, .basket-item-copy span { display: block; }
.basket-item-copy strong { font-size: .84rem; }
.basket-item-copy span { color: var(--steel); font-size: .74rem; }
.basket-item-qty { font-size: .8rem; font-weight: 800; }
.form-note { margin: 20px 0 0; color: var(--steel); font-size: .78rem; }
.dialog-actions { justify-content: flex-end; margin-top: 22px; }
.noscript-note { position: fixed; z-index: 100; right: 20px; bottom: 20px; padding: 14px 18px; color: #fff; background: #8f3028; }

@media (max-width: 1050px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .main-nav { display: none; }
  .hero-grid { gap: 40px; }
  .hero-products { min-height: 420px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .category-grid article:nth-child(2) { border-right: 0; }
  .category-grid article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .product-card { grid-template-columns: 1fr; }
  .product-image-wrap { min-height: 240px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-links { display: none; }
}

@media (max-width: 820px) {
  .hero-grid, .section-heading, .timber-grid, .trade-grid, .contact-card { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 65px 82px; }
  .hero-products { min-height: 500px; }
  .section-heading { gap: 14px; }
  .timber-heading { position: static; }
  .trade-grid, .contact-card { gap: 38px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 40% 60%; }
  .footer-grid { grid-template-columns: 1fr; }
  .trading-note { margin: 0; text-align: left; }
}

@media (max-width: 620px) {
  :root { --page: min(100% - 28px, 1200px); }
  .utility-inner { justify-content: center; min-height: 34px; }
  .utility-inner > span, .utility-inner a:last-child { display: none; }
  .header-inner { min-height: 72px; gap: 12px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-copy strong { font-size: .9rem; }
  .brand-copy small { font-size: .55rem; }
  .header-quote { min-height: 42px; padding-inline: 12px; font-size: .78rem; }
  h1 { font-size: clamp(3rem, 16vw, 4.6rem); }
  .hero-products { grid-template-columns: 1fr 1fr; grid-template-rows: 1.1fr .9fr; min-height: 460px; box-shadow: 14px 14px 0 rgba(23,111,136,.28); }
  .hero-product-main { grid-column: 1 / 3; grid-row: 1; }
  .hero-stamp { right: -7px; bottom: -12px; width: 84px; height: 84px; border-width: 6px; }
  .category-section, .timber-section, .products-section, .trade-section { padding-block: 74px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-grid article { min-height: 245px; border-right: 0; border-bottom: 1px solid var(--line); }
  .category-grid article:last-child { border-bottom: 0; }
  .category-grid h3 { margin-top: 35px; }
  .product-card { grid-template-columns: 1fr; }
  .product-image-wrap { min-height: 250px; }
  .timber-list { grid-template-columns: 1fr; }
  .timber-list article { min-height: 195px; border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .timber-list article:last-child { border-bottom: 0 !important; }
  .contact-card { padding: 30px 24px; }
  .basket-bar { right: 10px; bottom: 10px; left: 10px; min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .dialog-panel { padding: 25px 20px; }
  .basket-item { grid-template-columns: 46px 1fr auto; }
  .basket-item img { width: 46px; height: 46px; }
  .remove-item { grid-column: 2 / 4; justify-self: start; }
  .dialog-actions .button { width: 100%; }
}

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