/* ==========================================================================
   Precimill - single-file stylesheet
   Design intent: industrial B2B, high contrast, fast, no external requests.
   ========================================================================== */

:root {
  --navy-900: #0b1f33;
  --navy-800: #0f2a44;
  --navy-700: #16375a;
  --navy-600: #1d4a76;
  --steel-100: #eef2f6;
  --steel-200: #dde5ec;
  --steel-300: #c2cfda;
  --steel-500: #5d7386;
  --steel-700: #35485a;
  --ink-900: #101a24;
  --ink-700: #2b3947;
  --amber-500: #e08b1a;
  --amber-600: #c4760f;
  --green-600: #1f7a4d;
  --green-700: #17603c;
  --white: #ffffff;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 51, .08), 0 1px 3px rgba(11, 31, 51, .06);
  --shadow-md: 0 4px 12px rgba(11, 31, 51, .10);
  --wrap: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--white);
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  color: var(--navy-800);
  line-height: 1.22;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); margin-top: 1.9em; }
h3 { font-size: 1.16rem; }
p { margin: 0 0 1.05em; }
a { color: var(--navy-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--amber-600); }
img { max-width: 100%; height: auto; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: .45em; }
abbr { text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy-800); color: var(--white); padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 13px 22px; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--amber-500); color: var(--navy-900); border-color: var(--amber-500); }
.btn-primary:hover { background: var(--amber-600); border-color: var(--amber-600); color: var(--navy-900); }
.btn-wa { background: var(--green-600); color: var(--white); border-color: var(--green-600); }
.btn-wa:hover { background: var(--green-700); border-color: var(--green-700); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.btn-sm { padding: 9px 15px; font-size: .87rem; }
.btn-block { width: 100%; margin-bottom: 10px; }

/* ---------------------------------------------------------------- utility bar */

.utility-bar { background: var(--navy-900); color: var(--steel-200); font-size: .82rem; }
.utility-inner {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  align-items: center; justify-content: space-between; min-height: 38px;
}
.utility-bar p { margin: 0; }
.utility-bar a { color: var(--white); text-decoration: none; }
.utility-bar a:hover { color: var(--amber-500); text-decoration: underline; }
.utility-note { color: var(--steel-300); }
.dot { margin: 0 8px; color: var(--steel-500); }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--steel-200);
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 72px; }

.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.logo-mark {
  display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px;
  background: var(--navy-800); color: var(--white);
  font-weight: 800; font-size: .95rem; letter-spacing: .04em; border-radius: var(--radius);
}
.logo-text { display: flex; flex-direction: column; color: var(--navy-800); font-weight: 800; font-size: 1.22rem; line-height: 1.1; }
.logo-sub { font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-500); }

.primary-nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 12px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .93rem; font-weight: 600; color: var(--ink-700);
  text-decoration: none; border-radius: var(--radius);
}
.nav-link:hover, .nav-link.is-active { background: var(--steel-100); color: var(--navy-700); }
.nav-group { position: relative; }
.nav-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px;
  display: none; flex-direction: column; padding: 8px;
  background: var(--white); border: 1px solid var(--steel-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu, .nav-menu.is-open { display: flex; }
.nav-menu a {
  padding: 9px 12px; border-radius: var(--radius);
  color: var(--ink-700); text-decoration: none; font-size: .91rem; font-weight: 500;
}
.nav-menu a:hover { background: var(--steel-100); color: var(--navy-700); }
.nav-menu a.is-current { background: var(--steel-100); color: var(--navy-700); font-weight: 700; }
.caret { opacity: .6; }

.nav-burger {
  display: none; flex-direction: column; gap: 4px;
  padding: 11px 8px; background: none; border: 0; cursor: pointer;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--navy-800); }

/* ---------------------------------------------------------------- hero */

.hero {
  background:
    radial-gradient(1100px 420px at 78% -8%, rgba(29, 74, 118, .55), transparent 62%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 48%, var(--navy-700) 100%);
  color: var(--steel-100);
  padding: 54px 0 58px;
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 42px; align-items: start; }
.hero h1 { color: var(--white); margin-bottom: .5em; }
.answer-block {
  font-size: 1.09rem; color: var(--white);
  background: rgba(255, 255, 255, .07);
  border-left: 3px solid var(--amber-500);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.1em;
}
.hero .lede { color: var(--steel-200); font-size: 1rem; }
.hero .lede a { color: var(--white); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.hero-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-lg); padding: 22px;
}
.hero-card-title {
  margin: 0 0 .9em; font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--amber-500);
}
.fact-list { margin: 0; display: grid; gap: 12px; }
.fact-list div { display: grid; gap: 2px; padding-bottom: 11px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.fact-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.fact-list dt { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--steel-300); }
.fact-list dd { margin: 0; color: var(--white); font-size: .95rem; font-weight: 600; }

/* ---------------------------------------------------------------- breadcrumbs */

.breadcrumbs { background: var(--steel-100); border-bottom: 1px solid var(--steel-200); font-size: .84rem; }
.breadcrumbs .wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 42px; }
.breadcrumbs a { color: var(--navy-600); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: var(--steel-500); }
.breadcrumbs [aria-current] { color: var(--steel-700); font-weight: 600; }
.crumb-cat { color: var(--steel-500); }

/* ---------------------------------------------------------------- page body */

.page-body { padding: 44px 0 54px; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 52px; align-items: start; }
.content-col > section > h2:first-child { margin-top: 0; }
.content-col section + section { margin-top: 1.4em; }
.content-col > section > ul { margin-bottom: 1.4em; }
.content-col > section > ul > li { padding-left: .2em; }

.table-wrap { overflow-x: auto; margin: 0 0 1.5em; border: 1px solid var(--steel-200); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--white); }
caption {
  caption-side: top; text-align: left; padding: 12px 16px;
  font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--steel-700); background: var(--steel-100); border-bottom: 1px solid var(--steel-200);
}
th, td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--steel-200); }
thead th { background: var(--navy-800); color: var(--white); font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; }
tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; color: var(--navy-800); }

/* ---------------------------------------------------------------- FAQ */

.faq-section { margin-top: 2.4em; border-top: 2px solid var(--steel-200); padding-top: 1.6em; }
.faq { border-bottom: 1px solid var(--steel-200); }
.faq summary {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 15px 0; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+"; flex: 0 0 22px; height: 22px; display: grid; place-items: center;
  background: var(--steel-100); color: var(--navy-700); border-radius: 4px;
  font-weight: 700; font-size: 1rem; line-height: 1;
}
.faq[open] summary::before { content: "–"; background: var(--navy-700); color: var(--white); }
.faq summary h3 { margin: 0; font-size: 1.04rem; }
.faq summary:hover h3 { color: var(--navy-600); }
.faq-body { padding: 0 0 16px 32px; }
.faq-body p { margin: 0; color: var(--ink-700); }

/* ---------------------------------------------------------------- sidebar */

.side-col { display: grid; gap: 20px; position: sticky; top: 92px; }
.side-card { background: var(--white); border: 1px solid var(--steel-200); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.side-card h2 { margin: 0 0 .6em; font-size: 1.06rem; }
.side-card p { font-size: .92rem; color: var(--steel-700); }
.side-quote { background: var(--steel-100); border-color: var(--steel-300); }
.tick-list, .link-list { list-style: none; margin: 0; padding: 0; font-size: .91rem; }
.tick-list li { position: relative; padding-left: 25px; margin-bottom: 9px; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 13px; height: 7px; border-left: 2.2px solid var(--green-600);
  border-bottom: 2.2px solid var(--green-600); transform: rotate(-45deg);
}
.link-list li { margin-bottom: 8px; }
.link-list a { text-decoration: none; font-weight: 500; }
.link-list a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- card grids */

.home-sections { background: var(--steel-100); border-top: 1px solid var(--steel-200); padding: 14px 0 50px; }
.home-sections:empty { display: none; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px; }
.home-group { margin-top: 34px; }
.home-group h2 { margin-top: 0; }
.card {
  display: flex; flex-direction: column; padding: 20px;
  background: var(--white); border: 1px solid var(--steel-200);
  border-left: 3px solid var(--navy-600);
  border-radius: var(--radius); text-decoration: none;
  box-shadow: var(--shadow-sm); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-left-color: var(--amber-500); }
.card h4 { margin: 0 0 .45em; font-size: 1.05rem; color: var(--navy-800); }
.card p { margin: 0 0 14px; font-size: .89rem; color: var(--steel-700); }
.card-cta { margin-top: auto; font-size: .85rem; font-weight: 700; color: var(--navy-600); }
.card:hover .card-cta { color: var(--amber-600); }

/* ---------------------------------------------------------------- category pages */

/* The "All products" / "All resources" entry at the top of a nav dropdown, which links to
   the hub. Styled as a route out of the menu rather than as another item in the list. */
.nav-menu a.nav-hub {
  font-weight: 700;
  color: var(--navy-700);
  border-bottom: 1px solid var(--steel-200);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 4px;
}
.nav-menu a.nav-hub:hover { background: var(--steel-100); color: var(--amber-600); }

/* The member list on a category page. This is what turns nav -> category into a route
   through to the detail pages rather than a dead end. */
.hub-members {
  margin-top: 2.2em;
  border-top: 2px solid var(--steel-200);
  padding-top: 1.5em;
}
.hub-members h2 { margin-top: 0; }
.hub-count {
  margin: -0.5em 0 1.1em;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--steel-500);
}
.hub-members .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.hub-members .card h3 {
  margin: 0 0 .45em;
  font-size: 1.02rem;
  color: var(--navy-800);
}

/* ---------------------------------------------------------------- related links */

.related { margin-top: 2.4em; border-top: 2px solid var(--steel-200); padding-top: 1.5em; }.related h2 { margin-top: 0; font-size: 1.28rem; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.related-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin: 0; }
.related-label {
  flex: 0 0 auto; min-width: 92px;
  font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--steel-500);
}
.related-list a {
  padding: 3px 10px; background: var(--steel-100); border: 1px solid var(--steel-200);
  border-radius: 100px; font-size: .86rem; font-weight: 600; color: var(--navy-700); text-decoration: none;
}
.related-list a:hover { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }

/* ---------------------------------------------------------------- CTA + form */

.cta-block { background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%); color: var(--steel-100); padding: 50px 0 56px; }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 44px; align-items: start; }
.cta-copy h2 { color: var(--white); margin-top: 0; }
.cta-copy p { color: var(--steel-200); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.quote-form { background: var(--white); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-md); }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 5px; font-size: .84rem; font-weight: 700; color: var(--navy-800); }
.form-row label span { color: #c0392b; }
.form-row input, .form-row textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: .94rem;
  color: var(--ink-900); background: var(--white);
  border: 1px solid var(--steel-300); border-radius: var(--radius);
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--navy-600); outline-offset: 1px; border-color: var(--navy-600); }
.form-note { font-size: .82rem; color: var(--steel-700); margin: 0 0 14px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 12px; font-size: .88rem; font-weight: 600; }
.form-status.is-ok { color: var(--green-700); }
.form-status.is-error { color: #c0392b; }

/* ---------------------------------------------------------------- contact / quote page */

.contact-panel { background: var(--steel-100); border-top: 1px solid var(--steel-200); padding: 46px 0 54px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 46px; align-items: start; }
.contact-details h2 { margin-top: 0; }
.contact-details h2 + .contact-list { margin-top: 0; }
.contact-details h2:not(:first-child) { margin-top: 1.8em; }
.contact-list { display: grid; gap: 14px; margin: 0 0 4px; }
.contact-list div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.contact-list dt {
  font-size: .74rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--steel-500);
}
.contact-list dd { margin: 0; font-weight: 600; color: var(--navy-800); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-note { margin-top: 1.4em; padding: 15px 18px; background: var(--white); border-left: 3px solid var(--amber-500); border-radius: 0 var(--radius) var(--radius) 0; font-size: .93rem; }
.contact-form-col h2 { margin-top: 0; }
.contact-form-col .quote-form { border: 1px solid var(--steel-200); }

@media (max-width: 1080px) {
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 640px) {
  .contact-list div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------------------------------------------------------------- images / figures */

.page-figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px; padding: 26px 0 6px;
}
.page-figures .page-figure { margin: 0; }
.page-body .page-figure { margin: 0 0 1.5em; }

.page-figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--steel-200); border-radius: var(--radius);
  background: var(--steel-100);
}
.page-figure figcaption {
  margin-top: 8px; font-size: .85rem; line-height: 1.5; color: var(--steel-700);
  padding-left: 10px; border-left: 2px solid var(--amber-500);
}
.page-body .page-figure img { border-radius: var(--radius) var(--radius) 0 0; }

/* ---------------------------------------------------------------- footer */

.site-footer { background: var(--navy-900); color: var(--steel-300); font-size: .89rem; padding: 46px 0 22px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 30px; padding-bottom: 30px; }
.footer-col h2 {
  margin: 0 0 .8em; font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--amber-500);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--amber-500); text-decoration: underline; }
.footer-logo { margin: 0 0 .5em; font-size: 1.3rem; font-weight: 800; color: var(--white); }
.footer-contact { margin-top: 1em; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .8rem; color: var(--steel-500);
}
.footer-bottom p { margin: 0; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .page-grid { grid-template-columns: 1fr; gap: 34px; }
  .side-col { position: static; }
  .cta-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav-burger { display: flex; }
  .header-actions .btn { display: none; }
  .primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--steel-200);
    box-shadow: var(--shadow-md); padding: 10px; max-height: calc(100vh - 120px); overflow-y: auto;
  }
  .primary-nav.is-open { display: flex; }
  .site-header { position: relative; }
  .header-inner { position: relative; }
  .nav-group { width: 100%; }
  .nav-link { width: 100%; justify-content: space-between; padding: 13px 10px; }
  .nav-menu {
    position: static; display: none; box-shadow: none; border: 0;
    border-left: 2px solid var(--steel-200); border-radius: 0;
    margin: 0 0 6px 10px; padding: 2px 0 2px 8px; min-width: 0;
  }
  .nav-group:hover .nav-menu { display: none; }
  .nav-menu.is-open { display: flex; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .utility-inner { justify-content: center; text-align: center; }
  .utility-note { display: none; }
  .hero { padding: 38px 0 42px; }
  .hero-actions .btn { width: 100%; }
  .page-body { padding: 32px 0 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .card-grid { grid-template-columns: 1fr; }

  /* stacked tables on small screens */
  .table-wrap { border: 0; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  caption { border: 1px solid var(--steel-200); border-radius: var(--radius) var(--radius) 0 0; }
  tbody tr { border: 1px solid var(--steel-200); border-top: 0; padding: 6px 0; background: var(--white) !important; }
  tbody tr:last-child { border-radius: 0 0 var(--radius) var(--radius); }
  td { border: 0; padding: 7px 15px; }
  td:first-child { color: var(--navy-800); }
  td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--steel-500); font-weight: 700; margin-bottom: 2px;
  }
}

@media print {
  .utility-bar, .site-header, .hero-card, .side-col, .cta-block, .site-footer, .nav-burger { display: none; }
  body { font-size: 11pt; color: #000; }
  .hero { background: none; color: #000; padding: 0 0 12pt; }
  .hero h1, .answer-block { color: #000; }
  .answer-block { border-left: 3px solid #000; background: none; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
