/* Matec Label — site styles */

:root {
  /* Brand references (logo only; too saturated for large fills or body text) */
  --brand-blue: #001688;    /* Pantone Reflex Blue */
  --brand-orange: #ff5100;  /* Pantone Orange 021 */

  /* Navy scale, derived from Reflex Blue */
  --navy-950: #0e1538;      /* footer, utility bar */
  --navy-800: #1d2a64;      /* headings, label bands, primary buttons */
  --navy-700: #2b3a7c;      /* links */
  --navy-100: #e4e8f3;      /* chips, tints */

  /* Orange scale, derived from Orange 021 */
  --orange-hover: #e64900;  /* quote button hover (white large text, 4.0:1) */
  --orange-700: #b53c05;    /* deep orange, available for small text */
  --orange-600: #d94700;    /* icons, rules, underlines, focus ring */
  --orange-100: #fdeee6;    /* hover tint */

  /* Neutrals */
  --ink: #1f2433;
  --muted: #565c70;
  --steel: #f5f6f9;
  --line: #dadde6;
  --field: #8a90a3;         /* form borders (3.2:1) */
  --sep: #80869a;           /* breadcrumb separators */
  --white: #ffffff;
  --on-dark: #c6cbe0;       /* body text on navy */
  --on-dark-subtle: #a9b0cf;

  /* Aliases used throughout */
  --blue: var(--navy-800);
  --blue-deep: var(--navy-950);
  --blue-tint: var(--navy-100);
  --orange: var(--orange-600);
  --link: var(--navy-700);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: 118;            /* font-stretch for headings */

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-label: 10px;   /* die-cut label corners */
  --radius-ui: 6px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:hover { color: var(--navy-950); }

:focus-visible {
  outline: 3px solid var(--navy-700);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--blue); color: var(--white); padding: 10px 16px;
  border-radius: var(--radius-ui);
}
.skip-link:focus { top: 8px; color: var(--white); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-stretch: 118%;
  font-variation-settings: "wdth" var(--wide);
  color: var(--blue);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }

p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: inherit; font-weight: 700; font-size: 1rem;
  font-variation-settings: "wdth" 110;
  padding: .8em 1.4em;
  border-radius: var(--radius-ui);
  border: 2px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
/* Bright logo orange. White text is 3.3:1, so it must stay large text (>= 18.66px bold) to meet WCAG AA. */
.btn-quote { background: var(--brand-orange); color: var(--white); font-size: 1.2rem; font-weight: 700; padding: .65em 1.25em; }
.btn-quote:hover { background: var(--orange-hover); color: var(--white); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); color: var(--white); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }

/* ---------- Utility bar + header ---------- */

.utility {
  background: var(--blue-deep); color: var(--on-dark);
  font-size: .85rem;
}
.utility .wrap {
  display: flex; flex-wrap: wrap; gap: 4px 28px;
  justify-content: flex-end; padding-top: 7px; padding-bottom: 7px;
}
.utility a { color: var(--white); text-decoration: none; }
.utility a:hover { text-decoration: underline; color: var(--white); }
.utility span { color: var(--on-dark-subtle); margin-right: 6px; }
.utility .num { color: var(--white); margin-right: 0; }
.utility .call-label { display: none; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 80px;
}
.brand img { height: 46px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 600;
  padding: 10px 14px; border-radius: var(--radius-ui);
}
.nav a:not(.btn):hover { background: var(--navy-100); color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -3px 0 var(--orange); border-radius: 0; }
.nav .btn { margin-left: 12px; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
  color: var(--blue);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* Header switches to the menu button below 1080px: the full desktop nav needs ~1016px plus scrollbar */
@media (max-width: 1080px) {
  .utility .wrap { justify-content: flex-start; }
  .utility .hide-sm { display: none; }
  .site-header .wrap { height: 68px; }
  .brand img { height: 38px; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--orange); padding-left: 14px; }
  .nav .btn { margin: 16px 0 0; justify-content: center; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-steel { background: var(--steel); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: 36px; }
.section-head p { margin: 0; color: var(--muted); }
.section-head .text-link { white-space: nowrap; }

.text-link { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--orange); padding-bottom: 2px; }
.text-link:hover { color: var(--blue-deep); border-color: var(--blue-deep); }

/* ---------- Hero ---------- */

.hero { background: var(--steel); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px;
  align-items: center; padding-top: 64px; padding-bottom: 72px;
}
.hero h1 { max-width: 14ch; }
.hero .lead { color: var(--ink); }
.hero-figure { position: relative; margin: 0; }
.hero-figure img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.hero-figure figcaption {
  position: absolute; left: 16px; bottom: 16px;
  background: var(--white); color: var(--ink);
  font-size: .85rem; padding: 6px 12px; border-radius: 4px;
}
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin: 2rem 0 0; padding: 0; list-style: none;
  font-size: .95rem; color: var(--muted);
}
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 18px; height: 18px; color: var(--orange); flex: none; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; padding-bottom: 48px; }
}

/* ---------- Industry index ---------- */

.industries {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0; border-top: 1px solid var(--line);
  list-style: none; margin: 0; padding: 0;
}
.industries li { border-bottom: 1px solid var(--line); }
.industry {
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; align-items: center;
  padding: 20px 12px 20px 0; text-decoration: none; color: var(--ink); height: 100%;
}
.industry svg { width: 40px; height: 40px; color: var(--blue); grid-row: span 2; }
.industry strong { font-size: 1.08rem; font-variation-settings: "wdth" 110; color: var(--blue); }
.industry small { color: var(--muted); font-size: .88rem; }
.industry:hover strong { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.industry:hover svg { color: var(--orange); }
.industry:hover { background: var(--orange-100); }
.industry { padding-left: 12px; margin-left: -12px; border-radius: var(--radius-ui); }

/* ---------- Product label cards (signature element) ---------- */

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 28px; }

.label-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-label);
  overflow: hidden; text-decoration: none; color: var(--ink);
}
.label-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.label-band {
  background: var(--blue); color: var(--white);
  padding: 12px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
/* Covers product cards and office cards; specific enough to beat .body-copy h2 */
:is(.label-card, .office) .label-band :is(h2, h3) { color: var(--white); margin: 0; font-size: 1.12rem; }

/* Centered title band (product page specifications) */
.label-band.centered { position: relative; justify-content: center; padding: 10px 64px; }
.label-band.centered .cert { position: absolute; right: 18px; }
.label-band .cert {
  flex: none; font-size: .75rem; font-weight: 700;
  border: 1.5px solid rgba(255,255,255,.7); border-radius: 4px; padding: 2px 7px;
}
.spec { margin: 0; padding: 6px 18px 16px; flex: 1; }
.spec div {
  display: grid; grid-template-columns: 7.5em 1fr; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem;
}
.spec div:last-child { border-bottom: 0; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; }
.label-card .more {
  margin: 0 18px 18px; font-weight: 700; color: var(--blue);
}
.label-card .more { text-decoration: none; }
/* The "View" link stretches over the whole card, so the entire card is clickable */
.card-link::after { content: ""; position: absolute; inset: 0; }
.label-card.linked:hover { border-color: var(--orange); }
.label-card.linked:hover .label-band { background: var(--blue-deep); }
.label-card.linked:hover .more { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 4px; }

/* UL badges link to the UL listings; they sit above the stretched card link */
.label-band .cert-link {
  position: relative; z-index: 1;
  color: var(--white); text-decoration: none; padding: 4px 9px;
  transition: background-color .15s, color .15s;
}
.label-band .cert-link:hover { background: var(--white); color: var(--blue); border-color: var(--white); }
.label-band :focus-visible { outline-color: var(--white); }

/* ---------- Manufacturing band ---------- */

.plant { position: relative; background: var(--blue-deep); color: var(--white); overflow: hidden; }
.plant-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.plant .wrap { position: relative; padding-top: clamp(64px, 9vw, 112px); padding-bottom: clamp(64px, 9vw, 112px); }
.plant h2 { color: var(--white); max-width: 18ch; }
.plant p { color: var(--on-dark); }
.capabilities {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0; margin: 40px 0 0; padding: 0; list-style: none;
  border-top: 1px solid rgba(255,255,255,.25);
}
.capabilities li { padding: 22px 24px 8px 0; }
.capabilities h3 { color: var(--white); font-size: 1.05rem; margin-bottom: .4em; }
.capabilities h3::before {
  content: ""; display: block; width: 28px; height: 4px; background: var(--orange);
  margin-bottom: 14px; border-radius: 2px;
}
.capabilities p { font-size: .95rem; margin: 0; }

/* ---------- Certifications ---------- */

/* Centered row: stays balanced when there are fewer cards than columns */
.certs { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; list-style: none; margin: 0; padding: 0; }
.certs li { flex: 1 1 240px; max-width: 290px; }
@media (max-width: 600px) { .certs li { max-width: none; } }
.cert-item {
  display: grid; grid-template-rows: 110px auto auto; gap: 8px;
  padding: 24px; height: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-label);
  text-decoration: none; color: var(--ink);
}
.cert-item img { max-height: 96px; max-width: 70%; object-fit: contain; align-self: center; justify-self: center; }
.cert-item strong { color: var(--blue); font-variation-settings: "wdth" 110; }
.cert-item span { font-size: .9rem; color: var(--muted); }
.cert-item:hover { border-color: var(--blue); }
.cert-item:hover strong { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 4px; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field-hint { margin: -2px 0 8px; font-size: .88rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; background: var(--white);
  border: 1.5px solid var(--field); border-radius: var(--radius-ui);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,42,100,.18); }
.form-note { font-size: .88rem; color: var(--muted); margin: 0; }
.form-status { font-weight: 600; color: var(--blue); margin: 0; }

.offices { display: grid; gap: 20px; }
.office {
  border: 2px solid var(--blue); border-radius: var(--radius-label); overflow: hidden; background: var(--white);
}
.office .label-band { padding: 10px 18px; }
.office ul { list-style: none; margin: 0; padding: 12px 18px 16px; }
.office li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 7px 0; font-size: .95rem; }
.office li svg { width: 18px; height: 18px; color: var(--orange); margin-top: 4px; }
.office a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
.office a:hover { color: var(--blue); text-decoration-color: var(--orange); }

/* ---------- Page header (subpages) ---------- */

.page-head { background: var(--steel); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 40px; padding-bottom: 48px; }
.page-head h1 { margin-bottom: .35em; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--sep); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }

.page-head.has-photo { position: relative; background: var(--blue-deep); overflow: hidden; }
.page-head.has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.page-head.has-photo .wrap { position: relative; padding-top: 48px; padding-bottom: 64px; }
.page-head.has-photo h1 { color: var(--white); }
.page-head.has-photo .lead, .page-head.has-photo .crumbs, .page-head.has-photo .crumbs a { color: var(--on-dark); }

/* ---------- Product detail ---------- */

.product-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .product-detail { grid-template-columns: 1fr; gap: 32px; } }
.product-detail .photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Photo framing: print marks ----------
   Standalone photos (homepage hero, product and industry pages) sit in a hairline frame
   with orange crop marks at the corners, like a press proof. */
.hero-figure, .product-detail .photo {
  --mark: var(--orange-600);
  --mark-len: 18px;
  padding: 16px;
  background:
    linear-gradient(var(--mark), var(--mark)) left top / var(--mark-len) 2px,
    linear-gradient(var(--mark), var(--mark)) left top / 2px var(--mark-len),
    linear-gradient(var(--mark), var(--mark)) right top / var(--mark-len) 2px,
    linear-gradient(var(--mark), var(--mark)) right top / 2px var(--mark-len),
    linear-gradient(var(--mark), var(--mark)) left bottom / var(--mark-len) 2px,
    linear-gradient(var(--mark), var(--mark)) left bottom / 2px var(--mark-len),
    linear-gradient(var(--mark), var(--mark)) right bottom / var(--mark-len) 2px,
    linear-gradient(var(--mark), var(--mark)) right bottom / 2px var(--mark-len);
  background-repeat: no-repeat;
}
.hero-figure img, .product-detail .photo img { outline: 1px solid var(--line); }
@media (max-width: 600px) {
  .hero-figure, .product-detail .photo { padding: 12px; --mark-len: 14px; }
}
.product-detail .label-card { margin-top: 28px; }
.product-detail .label-card .spec { padding-bottom: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 8px; padding: 0; }
.chips a {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  background: var(--blue-tint); color: var(--blue); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.chips a:hover { background: var(--blue); color: var(--white); }

.body-copy h2 { font-size: 1.4rem; margin-top: 2rem; }

.cta-band { background: var(--blue); color: var(--white); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; padding-top: 44px; padding-bottom: 44px; }
.cta-band h2 { color: var(--white); margin: 0 0 .25em; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.cta-band p { margin: 0; color: var(--on-dark); }

/* ---------- Footer ---------- */

.site-footer { background: var(--blue-deep); color: var(--on-dark); font-size: .95rem; }
.site-footer .wrap { padding-top: 56px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid img { height: 48px; width: auto; margin-bottom: 16px; }
.site-footer h4 { color: var(--white); font-size: .98rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--orange); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 44px; padding-top: 20px; font-size: .85rem; color: var(--on-dark-subtle); }

/* Focus ring on dark sections */
.utility :focus-visible, .site-footer :focus-visible, .plant :focus-visible,
.cta-band :focus-visible, .page-head.has-photo :focus-visible { outline-color: var(--white); }
.field ::placeholder { color: var(--muted); opacity: 1; }

/* ---------- Touch targets ----------
   On phones and touch screens, links get tap areas of at least 44px tall (Apple's guideline;
   WCAG 2.2 requires at least 24px). The top bar uses 40px to stay compact. */
.label-band .cert-link::before { content: ""; position: absolute; inset: -8px; } /* larger invisible hit area for UL badges */

@media (max-width: 900px), (pointer: coarse) {
  .utility .wrap { padding-top: 2px; padding-bottom: 2px; row-gap: 0; }
  .utility a { display: inline-flex; align-items: center; min-height: 40px; }

  .crumbs { margin-bottom: 8px; }
  .crumbs li { display: flex; align-items: center; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }

  .text-link { display: inline-block; padding-top: 13px; }

  .chips a { padding: 11px 14px; }

  .office li { padding: 0; align-items: center; }
  .office li svg { margin-top: 0; }
  .office li a { display: block; padding: 10px 0; }

  .site-footer li { padding: 0; }
  .site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Small phones: the top bar becomes one row, "Call: Mexico · Texas · Canada", each name dialing that office */
@media (max-width: 480px) {
  .utility .wrap { flex-wrap: nowrap; justify-content: flex-start; gap: 0 4px; }
  .utility .call-label { display: inline; align-self: center; margin-right: 4px; }
  .utility .num { display: none; }
  .utility a { padding: 0 8px; }
  .utility a span { color: var(--white); font-weight: 600; margin-right: 0; text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
}
