/* Shared stylesheet for every site (both layouts). */

:root {
  --navy: #0e2b45;       /* hero, footer, headings */
  --converter: #1f6fe0;  /* links -- the paint on the converters in the photos */
  --converter-dark: #1558b8;
  --steel: #dfe5eb;      /* rules, borders */
  --plate: #f1f4f7;      /* panels */
  --ink: #1b2733;        /* body text */
  --muted: #566573;
  --amber: #f5b301;      /* the call button, nothing else */
  --white: #ffffff;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--converter); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--converter-dark); text-decoration-thickness: 2px; }

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

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

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: var(--white); padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- top bar ---------- */

.bar { background: var(--white); border-bottom: 1px solid var(--steel); }

.bar-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.wordmark {
  color: var(--navy);
  font-weight: 700;
  font-stretch: 125%;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--navy); }

.bar-nav { margin-right: auto; }
.bar-nav ul { display: flex; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.bar-nav a { color: var(--muted); font-size: 0.95rem; text-decoration: none; }
.bar-nav a:hover { color: var(--navy); text-decoration: underline; }

.wordmark + .bar-phone { margin-left: auto; }

.bar-phone {
  color: var(--navy);
  font-weight: 700;
  font-stretch: 87.5%;
  font-size: 1.125rem;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}

.hero-inner {
  position: relative;
  padding-top: clamp(2.5rem, 7vw, 5rem);
  padding-bottom: clamp(2.5rem, 7vw, 4.5rem);
}

.hero-art {
  position: absolute;
  width: min(42rem, 90vw);
  right: max(-10rem, -12vw);
  top: 50%;
  translate: 0 -50%;
  opacity: 0.16;
  pointer-events: none;
  animation: spin-in 1.6s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes spin-in {
  from { rotate: -40deg; opacity: 0; }
  to   { rotate: 0deg;   opacity: 0.16; }
}

.hero-title { margin: 0; font-weight: 400; line-height: 1; }
.hero-title a { color: inherit; text-decoration: none; display: inline-block; }
.hero-title a:hover .hero-code { color: #dbe8fb; }

.hero-pre, .hero-post {
  display: block;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 500;
  font-stretch: 100%;
  color: #b9cbe0;
}

.hero-code {
  display: block;
  margin: 0.05em 0 0.08em -0.04em;
  font-size: clamp(4.5rem, 16vw, 11rem);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.82;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero-code--long { font-size: clamp(2.75rem, 8vw, 5.5rem); line-height: 0.9; }

.hero-lede {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #dbe5f0;
}
.hero-lede a { color: var(--white); font-weight: 600; }
.hero-lede a:hover { color: var(--white); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

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

.btn {
  display: inline-block;
  padding: 0.85rem 1.3rem;
  border: 2px solid transparent;
  border-radius: 2px;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn-call { background: var(--amber); color: var(--navy); font-variant-numeric: tabular-nums; }
.btn-call:hover { background: #ffc629; color: var(--navy); }

.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); background: rgba(255, 255, 255, 0.06); }

.btn-submit { width: 100%; background: var(--converter); color: var(--white); }
.btn-submit:hover { background: var(--converter-dark); }

/* ---------- body: copy + side panel ---------- */

main { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.prose { max-width: 40rem; }
.prose p { margin: 0 0 1.15em; }
.prose em { font-style: normal; font-weight: 700; color: var(--navy); }

.section-title {
  margin: 0 0 0.6em;
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 750;
  font-stretch: 75%;
  line-height: 1.1;
}
.prose .section-title { margin-top: 2em; }

.spec-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--steel); }
.spec-list li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.4rem;
  border-bottom: 1px solid var(--steel);
}
.spec-list li::before {
  content: "";
  position: absolute; left: 0; top: 1.25rem;
  width: 0.5rem; height: 0.5rem;
  background: var(--converter);
}

.panel {
  position: sticky;
  top: 1.5rem;
  padding: 1.5rem;
  background: var(--plate);
  border-top: 4px solid var(--converter);
}
.panel p { margin: 0 0 1em; font-size: 1rem; }
.panel-title {
  margin: 0 0 0.6rem;
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 750;
  font-stretch: 75%;
  line-height: 1.15;
}
.panel-phone { font-size: 1.6rem !important; font-weight: 800; font-stretch: 87.5%; }
.panel-phone a { color: var(--navy); text-decoration: none; font-variant-numeric: tabular-nums; }

/* ---------- contact form ---------- */

.form { margin-top: 1.25rem; }

.field { margin-bottom: 0.9rem; }
.field label, .checks legend {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 600;
}
.optional { color: var(--muted); font-weight: 400; }

.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid #9fb0c0;
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgba(31, 111, 224, 0.35);
  outline-offset: 0;
  border-color: var(--converter);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem; }
.field-row--3 { grid-template-columns: 1fr 7rem 6rem; }

.checks {
  margin: 1.5rem 0 1.25rem;
  padding: 0;
  border: 0;
}
.checks legend {
  padding: 0;
  margin-bottom: 0.75rem;
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 750;
  font-stretch: 75%;
}

.captcha-row { display: flex; gap: 0.6rem; align-items: stretch; }
.captcha-row .captcha { width: 7rem; }

#captcha { display: flex; align-items: stretch; }
#captcha #code {
  display: flex; align-items: center;
  padding: 0 0.8rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.3rem;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
/* myjs2.js re-creates this button without a label, so the icon lives in CSS */
#captcha input[type="button"] {
  width: 2.6rem;
  border: 1px solid #9fb0c0;
  border-left: 0;
  background: var(--white) no-repeat center / 1.1rem
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e2b45' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 1 0-2.3 5.7'/%3E%3Cpath d='M20 4v7h-7'/%3E%3C/svg%3E");
  cursor: pointer;
}

.antispam { display: none; }

/* ---------- torque catalog ---------- */

.catalog { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.catalog-intro { max-width: 40rem; margin: 0 0 1.5rem; color: var(--muted); }

.parts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  background: var(--steel);   /* the 1px gaps become the ruled grid of a parts sheet */
}

.part { padding: 1.1rem 1.1rem 1.25rem; background: var(--white); }

.part-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.9rem; }
.part-photos img { width: 100%; aspect-ratio: 150 / 109; object-fit: contain; background: var(--plate); }

.part-head { margin: 0 0 0.35rem; font-size: 1rem; line-height: 1.2; }
.part-head a { color: var(--navy); text-decoration: none; }
.part-head a:hover { color: var(--converter); text-decoration: underline; }
.part-number { font-size: 1.35rem; font-weight: 750; font-stretch: 75%; }

.part-id { margin: -0.2rem 0 0.35rem; font-size: 0.9rem; color: var(--muted); }
.part-fits { margin: 0; font-size: 0.95rem; color: var(--muted); }
.part-splines { margin: 0.35rem 0 0; font-size: 0.95rem; color: var(--ink); font-weight: 600; }

.table-scroll { overflow-x: auto; border: 1px solid var(--steel); }
.oem { width: 100%; border-collapse: collapse; font-size: 0.97rem; font-variant-numeric: tabular-nums; }
.oem th, .oem td { padding: 0.6rem 0.9rem; text-align: left; border-bottom: 1px solid var(--steel); white-space: nowrap; }
.oem th { background: var(--plate); color: var(--navy); font-weight: 700; }
.oem tbody tr:last-child td { border-bottom: 0; }
.fineprint { max-width: 40rem; margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.chips a {
  display: inline-block; padding: 0.45rem 0.8rem;
  border: 1px solid var(--steel); color: var(--navy);
  font-weight: 700; font-stretch: 75%; font-size: 1.15rem; text-decoration: none;
}
.chips a:hover { border-color: var(--converter); color: var(--converter); }

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

.foot { background: var(--navy); color: #b9cbe0; font-size: 0.95rem; }
.foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.foot p { margin: 0 0 0.4rem; }
.foot-name { color: var(--white); font-weight: 700; font-stretch: 125%; }
.foot-name a { text-decoration: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; align-self: start; }
.foot a { color: var(--white); }
.foot-legal { grid-column: 1 / -1; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }

/* ---------- narrow screens ---------- */

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .panel { position: static; }
  .bar-inner { flex-wrap: wrap; gap: 0.25rem 1.25rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .bar-nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .bar-nav::-webkit-scrollbar { display: none; }
  .bar-nav ul { gap: 1rem; padding-bottom: 0.15rem; }
  .bar-nav a { white-space: nowrap; }
  .wordmark { margin-right: auto; }
  .wordmark + .bar-phone { margin-left: 0; }
  .foot-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .wordmark { font-size: 0.95rem; font-stretch: 100%; }
  .bar-phone { font-size: 0.95rem; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .field-row, .field-row--3 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art { animation: none; }
}
