/* Hexmark Safety. Colours and layout match the old WordPress (Total theme) site. */
@font-face { font-family: "Lexend"; font-weight: 300; font-display: swap; src: url("/assets/fonts/lexend-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-weight: 400; font-display: swap; src: url("/assets/fonts/lexend-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-weight: 600; font-display: swap; src: url("/assets/fonts/lexend-latin-600-normal.woff2") format("woff2"); }

:root {
  --orange: #db5c2a;     /* accent */
  --orange-2: #c53800;   /* button hover */
  --navy: #0e263d;
  --footer: #111827;
  --grey: #f9fafb;
  --text: #474747;
  --max: 1300px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Lexend", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-weight: 300; font-size: 16px; line-height: 1.7; color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); }
a:hover { color: var(--orange-2); }
p { margin: 0 0 1.1em; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; font-weight: 600; margin: 0 0 .6em; }
h2 { font-size: 1.6rem; }
strong { font-weight: 600; }
.container { width: min(var(--max), 90%); margin-inline: auto; }
.center { text-align: center; }
.skip, .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip:focus { left: 10px; top: 10px; width: auto; height: auto; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }
.icon { width: 1em; height: 1em; flex: none; }

/* Header and menu */
.site-header { background: #fff; position: relative; z-index: 5; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding-block: 15px; }
.logo img { width: 240px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 34px; }
.nav a { display: block; color: #010101; font-weight: 400; font-size: 17px; letter-spacing: 2px; text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--orange); }
@media (max-width: 860px) {
  .logo img { width: 190px; }
  .nav { flex-basis: 100%; }
  .nav ul { flex-direction: column; gap: 0; border-top: 1px solid #e5e7eb; margin-bottom: -15px; }
  .nav a { padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
  .nav li:last-child a { border-bottom: 0; }
}
.menu-toggle { color: var(--navy); }

/* Buttons */
.btn { display: inline-block; background: var(--orange); color: #fff; border: 2px solid var(--orange); border-radius: 0; font: inherit; font-weight: 400; padding: 9px 20px; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--orange-2); border-color: var(--orange-2); color: #fff; }
.btn-outline { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; border-color: #fff; color: var(--navy); }
.btn-big { font-size: 18px; padding: 12px 54px; }
.btn[disabled] { opacity: .7; cursor: wait; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* Home */
.hero { background: var(--navy); color: #fff; padding-block: 90px; }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 2.9rem); }
.hero p { font-size: 1.1rem; max-width: 560px; }
.hero img { width: 100%; max-width: 430px; justify-self: center; }
@media (max-width: 800px) { .hero { padding-block: 50px; } .hero .container { grid-template-columns: 1fr; gap: 36px; } }
.band { padding-block: 60px; }
.band.grey { background: var(--grey); }
.band h2.center { margin-bottom: 36px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 6px 20px rgba(14, 38, 61, .1); padding: 28px; }
.card-icon { display: inline-flex; color: var(--orange); margin-bottom: 10px; }
.card-icon .icon { width: 22px; height: 22px; }
.card-icon.round { width: 50px; height: 50px; border-radius: 50%; background: var(--orange); color: #fff; align-items: center; justify-content: center; }
.card h3 { font-size: 1.05rem; margin-bottom: .5em; }
.card p { margin: 0; }
.more { margin: 40px 0 0; }
@media (max-width: 800px) { .cards { grid-template-columns: 1fr; gap: 20px; } }

/* Inner pages */
.page-header { background: var(--navy); color: #fff; padding-block: 90px; }
.page-header h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 2.9rem); margin-bottom: .2em; }
.page-header p { font-size: 1.25rem; margin: 0; max-width: 900px; }
.about-header { background: linear-gradient(rgba(14, 38, 61, .6), rgba(14, 38, 61, .6)), var(--navy) url("/assets/img/about-header.webp") center / cover no-repeat; }
@media (max-width: 800px) { .about-header { background-image: linear-gradient(rgba(14, 38, 61, .6), rgba(14, 38, 61, .6)), url("/assets/img/about-header-sm.webp"); } }
.portfolio-header { background: linear-gradient(rgba(14, 38, 61, .55), rgba(14, 38, 61, .55)), var(--navy) url("/assets/img/portfolio-header.webp") center 30% / cover no-repeat; }
.contact-header { background: #1a2332; }
@media (max-width: 800px) { .page-header { padding-block: 50px; } .page-header p { font-size: 1.1rem; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split.flip img { order: 2; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 24px; } .split.flip img { order: 0; } }
.page { padding-block: 40px 70px; }

/* Portfolio */
.filters ul { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.filters a { display: block; border: 1px solid var(--navy); padding: 6px 14px; font-size: 14px; text-transform: uppercase; text-decoration: none; color: var(--orange); }
.filters a:hover { color: var(--orange-2); }
.filters a.active { background: var(--navy); color: #fff; }
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.products figure { margin: 0; scroll-margin-top: 20px; }
.products figure[hidden] { display: none; }
.products img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.products figcaption { text-align: center; color: var(--navy); font-weight: 400; margin-top: 8px; }
@media (max-width: 900px) { .products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .products { grid-template-columns: 1fr 1fr; gap: 16px; } }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; } }
.contact-form, .panel { background: #fff; border-radius: 12px; box-shadow: 0 6px 20px rgba(14, 38, 61, .1); padding: 28px; }
.panel + .panel { margin-top: 30px; }
.panel h2 { font-size: 1.2rem; }
.panel p { margin: 0; }
.mail { display: inline-flex; align-items: center; gap: 12px; font-size: 1.05rem; overflow-wrap: anywhere; text-decoration: none; }
.mail .icon { width: 20px; height: 20px; }
.hours { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; margin: 0; color: #010101; font-size: 15px; }
.hours dd { margin: 0; text-align: right; }
label { display: block; margin-bottom: 14px; color: #010101; font-size: 15px; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 16px; color: #333;
  background: #fff; border: 1px solid var(--orange); border-radius: 0; padding: 8px 10px;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.cf-turnstile { margin: 6px 0 10px; min-height: 65px; }
.notice { padding: 12px 16px; margin: 16px 0 0; color: #fff; }
.notice.ok { background: #2e7d32; }
.notice.err { background: #b3261e; }

/* Call to action and footer */
.callout { background: var(--navy); color: #fff; padding-block: 34px; }
.callout .container { display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; }
.callout p { margin: 0; }
.callout .callout-title { font-size: 1.25rem; margin-bottom: 10px; }
@media (max-width: 700px) { .callout .container { flex-direction: column; text-align: center; } }
.site-footer { background: var(--footer); color: #fff; text-align: center; font-size: 14px; padding: 18px 20px; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 95vw; max-height: 95vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
dialog.lightbox img { max-width: 95vw; max-height: 90vh; width: auto; }
dialog.lightbox button { position: fixed; top: 10px; right: 14px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }

/* Mobile menu: a hamburger button opens the menu (site.js). Without JavaScript the menu just shows. */
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .js .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0; background: none; border: 0; cursor: pointer; color: inherit; }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 26px; height: 3px; border-radius: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s; }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
  .menu-toggle span::before { top: -8px; } .menu-toggle span::after { top: 8px; }
  .menu-toggle[aria-expanded="true"] span { background: transparent; }
  .menu-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }
  .js #menu:not(.open) { display: none; }
}
