/* Mavrix Instruments website */
:root {
  --paper: #f3f6f7;
  --white: #ffffff;
  --ink: #0e2a47;
  --teal: #0f7c8c;
  --teal-dark: #0a5e6b;
  --slate: #4a5a6a;
  --rule: #cfd8de;
  --tint: #e5ecef;
  --gold: #b8892b;
  --radius: 4px;
  --wrap: 1180px;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6; font-variation-settings: "wdth" 100;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-variation-settings: "wdth" 80; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.9rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.12rem; font-variation-settings: "wdth" 90; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
.small { font-size: .9rem; color: var(--slate); }
.lead { font-size: 1.16rem; color: var(--slate); max-width: 62ch; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius);
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn-solid { background: var(--teal); color: #fff; }
.btn-solid:hover { background: var(--ink); color: #fff; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-quiet { background: transparent; color: var(--slate); border-color: var(--rule); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* header */
.site-head { background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.head-row { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand img { width: 120px; height: auto; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--teal); }
.list-btn {
  display: inline-flex; align-items: center; gap: 8px; font: 600 .95rem var(--font); color: var(--ink);
  background: var(--tint); border: 0; border-radius: var(--radius); padding: 10px 14px; cursor: pointer;
}
.list-btn .count { background: var(--ink); color: #fff; border-radius: 99px; min-width: 24px; padding: 1px 7px; font-size: .82rem; text-align: center; }
.list-btn.has-items .count { background: var(--teal); }
.menu-btn { display: none; margin-left: auto; font: 600 .95rem var(--font); background: none; border: 1px solid var(--rule); border-radius: var(--radius); padding: 9px 14px; color: var(--ink); }

/* hero */
.hero { background: var(--white); border-bottom: 1px solid var(--rule); padding: 56px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: center; }
.hero h1 { font-variation-settings: "wdth" 70; font-weight: 750; max-width: 13ch; }
.hero-fig { margin: 0; }
.drawing { position: relative; padding: 48px 0 64px; }
.drawing img { width: 100%; }
.callout { position: absolute; font-size: .84rem; font-weight: 600; color: var(--teal-dark); white-space: nowrap; }
.callout span { background: var(--white); padding: 0 4px; position: relative; }
.callout::before { content: ""; position: absolute; background: var(--teal); }
.c1 { left: 1%; top: 18%; }
.c1::before { width: 1px; height: 82px; left: 32px; top: 22px; }
.c2 { left: 22%; top: 9%; }
.c2::before { width: 1px; height: 112px; left: 40px; top: 22px; }
.c3 { right: 0; bottom: 10%; }
.c3::before { width: 1px; height: 48px; right: 60px; bottom: 22px; }
.dim {
  position: absolute; left: 1%; right: 1%; bottom: 0; height: 28px; border-left: 1px solid var(--slate); border-right: 1px solid var(--slate);
  display: flex; align-items: center; justify-content: center; font-size: .82rem; color: var(--slate);
}
.dim::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--slate); transform-origin: left; animation: draw 1.1s .2s ease-out both; }
.dim span { position: relative; background: var(--white); padding: 0 10px; }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 40px 0 0; border-top: 1px solid var(--rule); }
.facts div { padding: 22px 20px 26px 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts dt { font-weight: 700; font-size: 1.25rem; font-variation-settings: "wdth" 80; }
.facts dd { margin: 4px 0 0; color: var(--slate); font-size: .95rem; }

/* blocks */
.block { padding: 72px 0; }
.block-tight { padding: 40px 0 72px; }
.block-tint { background: var(--tint); }
.block-head { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: end; margin-bottom: 32px; }
.block-head p { color: var(--slate); margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

/* specialty list */
.spec-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.spec {
  display: grid; grid-template-columns: 150px 1fr; grid-template-rows: auto 1fr auto; column-gap: 22px;
  background: var(--white); padding: 22px; text-decoration: none; color: var(--ink); height: 100%;
}
.spec:hover { background: #fbfdfd; }
.spec:hover .spec-name { color: var(--teal-dark); }
.spec-img { grid-row: 1 / 4; display: flex; align-items: center; justify-content: center; height: 110px; }
.spec-img img { max-height: 110px; object-fit: contain; }
.spec-name { font-weight: 700; font-size: 1.25rem; font-variation-settings: "wdth" 80; }
.spec-blurb { color: var(--slate); font-size: .93rem; line-height: 1.5; margin-top: 4px; }
.spec-count { font-size: .88rem; font-weight: 600; color: var(--teal-dark); margin-top: 10px; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 58px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--teal); color: var(--teal-dark); font-weight: 700; display: grid; place-items: center;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 4px; border-left: 1px dashed var(--teal); }
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--slate); margin: 0; }
.steps-plain { margin-top: 12px; }

.contact-card { background: var(--white); border: 1px solid var(--rule); border-top: 4px solid var(--teal); padding: 28px; border-radius: var(--radius); }
.big-link { font-size: 1.15rem; font-weight: 600; word-break: break-word; }

/* page heads */
.page-head { background: var(--white); border-bottom: 1px solid var(--rule); padding: 48px 0 36px; }
.page-head-tall { padding: 96px 0; }
.page-head h1 { font-variation-settings: "wdth" 72; }
.crumbs { font-size: .9rem; color: var(--slate); margin-bottom: 10px; }
.search { margin-top: 22px; max-width: 620px; }
.search input {
  width: 100%; font: 400 1.05rem var(--font); padding: 14px 16px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.dl-line { margin: 14px 0 0; font-size: .95rem; color: var(--slate); }

/* search results */
.results { margin-bottom: 32px; }
.results h2 { font-size: 1.2rem; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.result-list a { display: grid; grid-template-columns: 84px 1fr; gap: 14px; background: var(--white); padding: 14px; text-decoration: none; color: var(--ink); height: 100%; }
.result-list img { width: 84px; height: 60px; object-fit: contain; }
.result-list strong { display: block; line-height: 1.3; }
.result-list span { font-size: .85rem; color: var(--slate); }

/* catalogue layout */
.cat-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; padding-top: 36px; padding-bottom: 72px; }
.toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.toc h2 { font-size: 1rem; font-variation-settings: "wdth" 100; color: var(--slate); font-weight: 600; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0 6px 14px; color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.35; margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { border-left-color: var(--teal); color: var(--teal-dark); }
.toc a span { color: var(--slate); font-size: .85rem; }
.group { margin-bottom: 48px; scroll-margin-top: 96px; }
.group h2 { font-size: 1.6rem; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-top: 0; }
.product { background: var(--white); padding: 18px 18px 14px; display: flex; flex-direction: column; scroll-margin-top: 96px; }
.product:target { outline: 3px solid var(--teal); outline-offset: -3px; }
.p-img { height: 150px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.p-img img { max-height: 150px; width: auto; object-fit: contain; }
.noimg { color: var(--slate); font-size: .85rem; }
.p-name { margin-bottom: 2px; }
.p-desc { color: var(--slate); font-size: .9rem; line-height: 1.45; margin-bottom: 8px; }
.variants { width: 100%; border-collapse: collapse; font-size: .86rem; margin-top: auto; }
.variants th { text-align: left; font-weight: 600; color: var(--slate); border-bottom: 1px solid var(--rule); padding: 6px 4px 4px 0; font-size: .8rem; }
.variants td { border-bottom: 1px solid var(--tint); padding: 5px 4px 5px 0; vertical-align: middle; line-height: 1.3; }
.variants tr:last-child td { border-bottom: 0; }
.variants .code { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.variants .add { text-align: right; width: 1%; }
.add-btn { font: 600 .8rem var(--font); color: var(--teal-dark); background: transparent; border: 1px solid var(--teal); border-radius: var(--radius); padding: 4px 10px; cursor: pointer; white-space: nowrap; }
.add-btn:hover { background: var(--tint); }
.add-btn[aria-pressed="true"] { background: var(--teal); color: #fff; }
.nomatch { padding: 24px 0; color: var(--slate); }

/* prose pages */
.prose-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h2:first-child { margin-top: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.terms { margin: 0; border-top: 1px solid var(--rule); }
.terms div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.terms dt { font-weight: 700; }
.terms dd { margin: 0; color: var(--slate); }

/* form */
.form { background: var(--white); border: 1px solid var(--rule); padding: 28px; border-radius: var(--radius); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; font: 400 1rem var(--font); padding: 11px 12px; border: 1px solid #9fb0bb; border-radius: var(--radius); color: var(--ink); background: #fff; }
.field input:focus, .field textarea:focus { border-color: var(--teal); outline: 2px solid var(--teal); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: #b3261e; }
.hint { font-size: .86rem; color: var(--slate); margin: 6px 0 0; }
.hp { position: absolute; left: -5000px; }
.form-error { color: #b3261e; font-weight: 600; }

/* drawer */
.drawer { position: fixed; inset: 0; background: rgba(14, 42, 71, .45); z-index: 40; display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-panel { background: var(--white); width: min(440px, 100%); height: 100%; display: flex; flex-direction: column; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--rule); }
.drawer-head h2 { margin: 0; font-size: 1.35rem; }
.close { font-size: 1.8rem; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 4px 8px; }
.drawer-body { flex: 1; overflow: auto; padding: 8px 22px; }
.drawer-foot { display: flex; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--rule); }
.drawer-foot .btn-solid { flex: 1; }
.list-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--tint); }
.list-item strong { font-size: .95rem; }
.list-item small { color: var(--slate); grid-column: 1; }
.list-item .qty { grid-row: 1 / 3; grid-column: 2; display: flex; align-items: center; gap: 6px; }
.list-item input { width: 74px; font: 400 .95rem var(--font); padding: 6px 8px; border: 1px solid #9fb0bb; border-radius: var(--radius); }
.list-item button { background: none; border: 0; color: var(--slate); cursor: pointer; font-size: .85rem; text-decoration: underline; padding: 4px; }
.empty { color: var(--slate); padding: 20px 0; }

/* footer */
.site-foot { background: var(--ink); color: #c9d6df; padding: 56px 0 24px; font-size: .95rem; }
.site-foot a { color: #fff; }
.site-foot h2 { color: #fff; font-size: 1.05rem; font-variation-settings: "wdth" 100; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1.4fr 1fr; gap: 40px; }
.foot-grid img { width: 130px; margin-bottom: 16px; }
.foot-list { list-style: none; margin: 0; padding: 0; columns: 1; }
.foot-grid > div:nth-child(2) .foot-list { columns: 2; column-gap: 24px; }
.foot-list li { margin-bottom: 6px; break-inside: avoid; }
.foot-base { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 18px; font-size: .85rem; }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 54px; height: 54px; border-radius: 50%; background: #1f9d55; color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(14,42,71,.3); z-index: 30; }
.wa-float:hover { background: #17803f; color: #fff; }

/* responsive */
@media (max-width: 980px) {
  .hero-grid, .split, .prose-grid, .block-head { grid-template-columns: 1fr; }
  .hero-grid { gap: 8px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .spec-list { grid-template-columns: 1fr; }
  .cat-layout { grid-template-columns: 1fr; padding-top: 20px; }
  .toc { position: static; max-height: none; }
  .toc ul { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
  .toc a { border: 1px solid var(--rule); border-radius: 99px; padding: 4px 12px; margin: 0; background: var(--white); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .head-row { gap: 10px; min-height: 64px; flex-wrap: wrap; }
  .brand img { width: 96px; }
  .menu-btn { display: inline-block; }
  .site-nav { display: none; width: 100%; flex-direction: column; gap: 0; margin: 0; order: 3; padding-bottom: 10px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; border-bottom: 1px solid var(--tint); }
  .list-btn { padding: 9px 10px; font-size: .88rem; }
  .hero { padding-top: 32px; }
  .drawing { padding: 40px 0 48px; }
  .callout { font-size: .72rem; }
  .c1::before { height: 50px; } .c2::before { height: 70px; left: 40px; } .c3::before { height: 30px; }
  .c2 { left: 40%; }
  .spec { grid-template-columns: 96px 1fr; padding: 16px; column-gap: 14px; }
  .spec-img { height: 80px; } .spec-img img { max-height: 80px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form, .contact-card { padding: 20px; }
  .terms div { grid-template-columns: 1fr; gap: 2px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-grid > div:nth-child(2) .foot-list { columns: 2; }
  .block { padding: 52px 0; }
}
@media (max-width: 420px) {
  .facts { grid-template-columns: 1fr; }
  .facts div, .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .facts div:first-child { border-top: 0; }
}
