/* ==========================================================================
   PbX Labs — Noki Technologies
   Palette is drawn from the products themselves: brushed steel, lead
   graphite, and the amber of the Noki trefoil mark.
   ========================================================================== */

:root {
  --graphite-900: #14181C;
  --graphite-800: #1E242A;
  --graphite-600: #48525C;
  --graphite-400: #7C8894;
  --steel-200:    #DCE1E7;
  --steel-100:    #EBEEF2;
  --steel-50:     #F5F7F9;
  --paper:        #FFFFFF;
  --amber:        #F2A33C;
  --amber-ink:    #8A5406;
  --rule:         #CFD6DD;

  --shell: 1180px;
  --gut: clamp(1.25rem, 4vw, 3rem);

  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.3125rem;
  --step-2:  1.625rem;
  --step-3:  clamp(1.75rem, 1.2rem + 2vw, 2.4rem);
  --step-4:  clamp(2.1rem, 1.3rem + 3.2vw, 3.3rem);
  --step-5:  clamp(2.6rem, 1.2rem + 5.4vw, 4.75rem);

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--steel-100);
  color: var(--graphite-800);
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.021em;
  line-height: 1.04;
  color: var(--graphite-900);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; max-width: 68ch; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--amber-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--graphite-900); }

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

.shell { width: min(var(--shell), 100% - var(--gut) * 2); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--graphite-900); color: #fff;
  padding: 0.75rem 1.25rem; z-index: 99;
}
.skip:focus { left: 1rem; top: 1rem; }

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

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 24, 28, 0.97);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid #000;
}
.topbar__in {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.brandmark {
  display: flex; align-items: center; gap: 0.65rem;
  text-decoration: none; margin-right: auto;
}
.brandmark svg { width: 26px; height: 26px; flex: none; }
.brandmark b {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: 1.2rem; letter-spacing: -0.01em; color: #fff;
}
.brandmark span {
  font-size: 0.72rem; color: var(--graphite-400);
  letter-spacing: 0.04em; line-height: 1.1;
  border-left: 1px solid var(--graphite-600); padding-left: 0.65rem;
  max-width: 11ch;
}
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  color: var(--steel-200); text-decoration: none;
  font-size: 0.95rem; padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--amber); }
.nav .btn-quote {
  border: 1px solid var(--amber); color: var(--amber);
  padding: 0.5rem 1rem; border-radius: 2px; border-bottom-width: 1px;
}
.nav .btn-quote:hover { background: var(--amber); color: var(--graphite-900); border-bottom-color: var(--amber); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--graphite-600);
  color: #fff; border-radius: 2px; padding: 0.5rem 0.7rem; cursor: pointer;
  font-family: var(--text); font-size: 0.9rem;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--graphite-900); padding: 0.5rem var(--gut) 1.25rem;
    border-bottom: 1px solid #000;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--graphite-800); }
  .nav .btn-quote { text-align: center; margin-top: 0.85rem; }
  .brandmark span { display: none; }
}

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

.hero {
  position: relative; overflow: hidden;
  background: var(--graphite-900);
  color: var(--steel-100);
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 7vw, 5.5rem);
}
/* One diagonal, echoing the brochure cover. Used once on the site. */
.hero::after {
  content: ""; position: absolute; inset: auto -10% -45% 55%;
  height: 90%;
  background: linear-gradient(103deg, transparent 49.6%, #2A2119 49.6%, #6E4A14 100%);
  transform: skewX(-14deg);
  pointer-events: none;
}
.hero__in {
  position: relative; z-index: 1;
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
}
@media (max-width: 880px) { .hero__in { grid-template-columns: 1fr; } }

.hero h1 {
  color: #fff;
  font-size: var(--step-5);
  font-stretch: 122%;
  font-weight: 900;
  margin-bottom: 1.1rem;
}
.hero__lede { color: var(--steel-200); font-size: var(--step-1); line-height: 1.5; max-width: 42ch; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem;
  margin: 1.75rem 0 2rem; padding-top: 1.25rem;
  border-top: 1px solid var(--graphite-600);
  font-size: 0.95rem; color: var(--graphite-400);
}
.hero__meta strong { color: #fff; font-weight: 500; }
.hero__art { justify-self: center; }
.hero__art img {
  width: min(480px, 100%);
  filter: drop-shadow(0 26px 45px rgba(0,0,0,0.55));
  animation: settle 900ms cubic-bezier(.2,.7,.3,1) both;
}
@keyframes settle {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

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

.btn {
  display: inline-block; border: 0; border-radius: 2px; cursor: pointer;
  font-family: var(--text); font-size: 1rem; font-weight: 500;
  padding: 0.85rem 1.6rem; text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}
.btn--amber { background: var(--amber); color: var(--graphite-900); }
.btn--amber:hover { background: #ffb954; color: var(--graphite-900); }
.btn--ghost { border: 1px solid var(--graphite-600); color: var(--steel-200); }
.btn--ghost:hover { border-color: var(--steel-200); color: #fff; }
.btn--dark { background: var(--graphite-900); color: #fff; }
.btn--dark:hover { background: var(--graphite-800); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* --- Generic band --------------------------------------------------------- */

.band { padding-block: clamp(3rem, 6vw, 5.25rem); }
.band--paper { background: var(--paper); }
.band--steel { background: var(--steel-100); }
.band--dark { background: var(--graphite-900); color: var(--steel-200); }
.band--dark h2, .band--dark h3 { color: #fff; }

.band__head { max-width: 62ch; margin-bottom: 2.5rem; }
.band__head h2 { font-size: var(--step-4); margin-bottom: 0.75rem; }
.band__head p { color: var(--graphite-600); font-size: var(--step-1); line-height: 1.55; margin: 0; }
.band--dark .band__head p { color: var(--graphite-400); }

/* --- The lead scale ------------------------------------------------------- */
/* The rule above each band is drawn to the thickness of the lead it
   describes, so the graphic itself is the specification. */

.scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); }
.scale__cell {
  background: var(--paper); border: 0; text-align: left; cursor: pointer;
  padding: 0 1.4rem 1.6rem; font: inherit; color: inherit;
  display: flex; flex-direction: column;
  transition: background-color 150ms ease;
}
.scale__cell:hover { background: var(--steel-50); }
.scale__bar { display: block; background: var(--graphite-900); margin: 0 -1.4rem 1.5rem; }
.scale__cell:nth-child(1) .scale__bar { height: 4px; }
.scale__cell:nth-child(2) .scale__bar { height: 10px; }
.scale__cell:nth-child(3) .scale__bar { height: 19px; }
.scale__cell:nth-child(4) .scale__bar { height: 30px; }
.scale__mm {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: var(--step-3); line-height: 1; letter-spacing: -0.03em;
  color: var(--graphite-900);
}
.scale__mm i { font-style: normal; font-size: 0.42em; font-weight: 600; margin-left: 0.3em; letter-spacing: 0; }
.scale__name { font-weight: 600; margin: 0.7rem 0 0.35rem; }
.scale__note { font-size: var(--step--1); color: var(--graphite-600); margin: 0; }
.scale__cell b {
  margin-top: auto; padding-top: 1.1rem; font-weight: 500;
  font-size: var(--step--1); color: var(--amber-ink);
}
@media (max-width: 760px) {
  .scale { grid-template-columns: 1fr; }
  .scale__cell { padding: 0 0 1.75rem; }
  .scale__cell b { padding-top: 0.9rem; }
  .scale__bar { margin: 0 0 1.1rem; width: 100%; }
}

/* --- Applications --------------------------------------------------------- */

.apps { display: grid; gap: 1px; background: var(--rule); grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .apps { grid-template-columns: 1fr; } }
.app { background: var(--paper); padding: clamp(1.6rem, 3vw, 2.4rem); }
.app h3 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.app p { color: var(--graphite-600); margin-bottom: 1.1rem; }
.app ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.app li a {
  display: inline-block; text-decoration: none; color: var(--graphite-800);
  border: 1px solid var(--rule); border-radius: 2px;
  padding: 0.3rem 0.7rem; font-size: var(--step--1);
}
.app li a:hover { border-color: var(--graphite-900); background: var(--steel-50); }

/* --- Product grid --------------------------------------------------------- */

.filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding-bottom: 1.75rem; margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.chip {
  font: inherit; font-size: 0.95rem; cursor: pointer;
  background: var(--paper); color: var(--graphite-800);
  border: 1px solid var(--rule); border-radius: 2px;
  padding: 0.5rem 1rem;
}
.chip:hover { border-color: var(--graphite-600); }
.chip[aria-pressed="true"] { background: var(--graphite-900); border-color: var(--graphite-900); color: #fff; }

.grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex; flex-direction: column;
}
.card__fig {
  margin: 0; background: var(--steel-50);
  border-bottom: 1px solid var(--rule);
  height: 236px;
  display: grid; place-items: center; padding: 1.25rem;
}
.card__fig img { max-height: 186px; width: auto; max-width: 100%; object-fit: contain; }
.card__fig--mark { background: var(--graphite-900); }
.card__fig--mark svg { width: 74px; height: 74px; opacity: 0.85; }
.card__body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card__mm {
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: 0.82rem; letter-spacing: 0.005em;
  color: var(--amber-ink); margin-bottom: 0.5rem;
}
.card h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.card p { color: var(--graphite-600); font-size: 0.97rem; margin-bottom: 1.1rem; }

.card details { margin-top: auto; border-top: 1px solid var(--rule); padding-top: 0.9rem; }
.card summary {
  cursor: pointer; font-weight: 600; font-size: 0.95rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.card summary::-webkit-details-marker { display: none; }
.card summary::after { content: "+"; font-size: 1.25rem; line-height: 1; color: var(--graphite-400); }
.card details[open] summary::after { content: "\2013"; }

.spec { width: 100%; border-collapse: collapse; margin-top: 0.9rem; font-size: 0.92rem; }
.spec th, .spec td { text-align: left; padding: 0.5rem 0; vertical-align: top; border-bottom: 1px solid var(--steel-200); }
.spec th { font-weight: 500; color: var(--graphite-600); width: 46%; padding-right: 1rem; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }

.flag {
  margin-top: 0.9rem; padding: 0.7rem 0.85rem;
  background: #FDF3E3; border-left: 3px solid var(--amber);
  font-size: 0.86rem; color: var(--amber-ink);
}

.empty { padding: 3rem 0; color: var(--graphite-600); }

/* --- Hot cell feature ----------------------------------------------------- */

.hotcell {
  display: grid; gap: 1.75rem 2.5rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 2.5rem;
  padding-top: 2rem; border-top: 1px solid var(--graphite-800);
}
@media (max-width: 760px) { .hotcell { grid-template-columns: 1fr; gap: 1.5rem; } }
.hotcell dt {
  font-family: var(--display); font-weight: 700; font-stretch: 108%;
  color: #fff; font-size: 1.05rem; margin-bottom: 0.4rem;
}
.hotcell dd { margin: 0; color: var(--graphite-400); font-size: 0.97rem; }

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

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 0.35rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem;
  padding: 0.7rem 0.85rem; background: var(--paper);
  border: 1px solid var(--rule); border-radius: 2px; color: var(--graphite-900);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--graphite-600); }
.field textarea { min-height: 130px; resize: vertical; }
.field small { display: block; color: var(--graphite-600); font-size: 0.83rem; margin-top: 0.3rem; }
.form-note { font-size: 0.88rem; color: var(--graphite-600); margin-top: 1rem; }

.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.detail-list li:first-child { padding-top: 0; }
.detail-list dt, .detail-list b { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 0.2rem; }
.detail-list a { font-size: var(--step-1); }
.detail-list address { font-style: normal; line-height: 1.55; }

/* --- CTA + footer --------------------------------------------------------- */

.cta { background: var(--amber); padding-block: clamp(2.5rem, 5vw, 4rem); }
.cta__in { display: flex; flex-wrap: wrap; gap: 1.75rem; align-items: center; justify-content: space-between; }
.cta h2 { font-size: var(--step-3); margin-bottom: 0.4rem; }
.cta p { color: #6B420A; margin: 0; }

.foot { background: var(--graphite-900); color: var(--graphite-400); padding-block: 3.25rem 2rem; font-size: 0.94rem; }
.foot a { color: var(--steel-200); }
.foot a:hover { color: var(--amber); }
.foot__cols { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 760px) { .foot__cols { grid-template-columns: 1fr; } }
.foot h4 { color: #fff; font-size: 0.95rem; font-stretch: 100%; margin-bottom: 0.9rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot ul a { text-decoration: none; }
.foot ul a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot li { margin-bottom: 0.5rem; }
.foot address { font-style: normal; line-height: 1.6; }
.foot__base {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--graphite-800);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: 0.86rem;
}
.foot__tag { font-family: var(--display); font-weight: 700; font-stretch: 110%; color: var(--amber); }

/* --- Page header for interior pages --------------------------------------- */

.pagehead { background: var(--graphite-900); color: var(--steel-200); padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.pagehead h1 { color: #fff; font-size: var(--step-4); margin-bottom: 0.85rem; }
.pagehead p { color: var(--graphite-400); font-size: var(--step-1); max-width: 58ch; margin: 0; }
