/* MDR ASSOCIATES LIMITED — timing trace plotting desk theme
   Body: scope-graphite #1B1F22 | Text: trace-chalk #E8E5D9
   Accent: PLOT-PHOSPHOR #46B86C | Chassis: #242A2F | Panel: #262C31
   Base: #31383E | Grid: #2C3338 | Cursor-only: CURSOR-SCARLET #C24437 */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: #1B1F22;
  color: #E8E5D9;
  line-height: 1.7;
  overflow-x: hidden;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.22;
}

p {
  color: #E8E5D9;
}

a {
  color: #46B86C;
  text-decoration: none;
}

a:hover {
  color: #E8E5D9;
}

/* ============ INSTRUMENT PANEL HEADER ============ */

.panelhead {
  position: relative;
  background-color: #242A2F;
  border-bottom: 3px solid #2C3338;
}

.panelhead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0 14px 0;
}

.brandcluster {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bnc-pair {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.bnc {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #46B86C;
  background-color: #1B1F22;
}

.bnc::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background-color: #46B86C;
}

.bnc-stub {
  width: 32px;
  height: 3px;
  background-color: #31383E;
  align-self: center;
}

.brandname {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #E8E5D9;
  text-transform: uppercase;
}

.brandname small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: #46B86C;
  font-weight: 600;
}

.panelnav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.panelnav a {
  position: relative;
  color: #E8E5D9;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-left: 1px solid #31383E;
}

.panelnav a:first-child {
  border-left: none;
}

.panelnav a:hover {
  color: #46B86C;
}

.panelphos {
  height: 3px;
  width: 100%;
  background-color: #46B86C;
}

.navtoggle {
  display: none;
  background-color: #31383E;
  color: #E8E5D9;
  border: 1px solid #46B86C;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .navtoggle {
    display: block;
  }
  .panelnav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-top: 12px;
  }
  .panelnav.open {
    display: flex;
  }
  .panelnav a {
    border-left: none;
    border-top: 1px solid #31383E;
    padding: 13px 4px;
  }
  .panelhead-inner {
    flex-wrap: wrap;
  }
}

/* ============ TRACE SCREEN HERO ============ */

.tracehero {
  position: relative;
  padding: 66px 0 0 0;
  background-color: #1B1F22;
}

.herotext {
  max-width: 940px;
  margin-bottom: 40px;
}

.herohead {
  font-size: 54px;
  font-weight: 700;
  color: #E8E5D9;
  margin: 0 0 6px 0;
}

.herohead .displayword {
  display: block;
  font-size: 84px;
  letter-spacing: 0.05em;
  color: #46B86C;
  line-height: 1;
}

.herolede {
  font-size: 17.5px;
  max-width: 760px;
  color: #E8E5D9;
  margin: 22px 0 0 0;
}

.inlinecta {
  display: inline-block;
  margin-top: 18px;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: #46B86C;
  border-bottom: 1px dashed #46B86C;
  padding-bottom: 3px;
}

.inlinecta:hover {
  color: #E8E5D9;
  border-bottom-color: #E8E5D9;
}

/* graticule band */
.graticuleband {
  position: relative;
  background-color: #262C31;
  border-top: 1px solid #2C3338;
  background-image:
    linear-gradient(#2C3338 1px, transparent 1px),
    linear-gradient(90deg, #2C3338 1px, transparent 1px);
  background-size: 34px 34px;
  padding: 0;
  overflow: hidden;
}

.tracesurface {
  position: relative;
  height: 240px;
  width: 100%;
}

.trace-coarse {
  position: absolute;
  left: 4%;
  top: 22%;
  width: 30%;
  height: 120px;
}

.trace-fine {
  position: absolute;
  left: 36%;
  top: 30%;
  width: 30%;
  height: 100px;
}

.wavepath {
  fill: none;
  stroke: #46B86C;
  stroke-width: 3;
  stroke-linejoin: miter;
}

.cursorline {
  position: absolute;
  right: 12%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #C24437;
}

.cursorflag {
  position: absolute;
  right: 12%;
  top: 14px;
  transform: translateX(-100%);
  background-color: #C24437;
  color: #E8E5D9;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.triggerarrow {
  position: absolute;
  right: 24%;
  top: 40%;
  width: 0;
  height: 0;
  border-left: 12px solid #46B86C;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.leveldash {
  position: absolute;
  right: 25%;
  top: 40%;
  width: 20%;
  height: 0;
  border-top: 2px dashed #46B86C;
}

.primarybar {
  display: block;
  width: 100%;
  background-color: #46B86C;
  color: #1B1F22;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 18px 24px;
  text-align: left;
}

.primarybar span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.primarybar:hover {
  background-color: #E8E5D9;
  color: #1B1F22;
}

.primarybar .arrow {
  font-size: 20px;
  line-height: 1;
}

/* ============ LOGIC LANE STAVES ============ */

.lanestack {
  background-color: #1B1F22;
  padding: 58px 0 20px 0;
}

.lanestack-title {
  font-size: 15px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #46B86C;
  margin: 0 0 8px 0;
}

.lanestack-head {
  font-size: 34px;
  color: #E8E5D9;
  margin: 0 0 34px 0;
  max-width: 820px;
}

.lanestave {
  position: relative;
  display: flex;
  align-items: center;
  gap: 26px;
  border-top: 1px solid #2C3338;
  padding: 18px 0;
}

.lanestave:last-child {
  border-bottom: 1px solid #2C3338;
}

.lane-a { min-height: 88px; }
.lane-c { min-height: 122px; }
.lane-d { min-height: 96px; }
.lane-f { min-height: 140px; }
.lane-g { min-height: 104px; }
.lane-k { min-height: 128px; }

.channeltab {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  background-color: #262C31;
  color: #46B86C;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #46B86C;
}

.lanewave {
  flex: 0 0 auto;
  width: 92px;
  height: 40px;
}

.lanewave svg {
  width: 100%;
  height: 100%;
}

.lanewave .seg {
  fill: none;
  stroke: #46B86C;
  stroke-width: 3;
  stroke-linejoin: miter;
}

.nibbleblock {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.nibbleblock i {
  display: block;
  width: 10px;
  height: 20px;
  background-color: #C24437;
}

.lanebody {
  flex: 1 1 auto;
}

.lanebody h3 {
  margin: 0 0 6px 0;
  font-size: 21px;
  color: #E8E5D9;
}

.lanebody h3 a {
  color: #E8E5D9;
  border-bottom: 1px solid #46B86C;
}

.lanebody h3 a:hover {
  color: #46B86C;
}

.lanebody p {
  margin: 0;
  font-size: 15.5px;
  max-width: 760px;
}

@media (max-width: 760px) {
  .lanestave {
    flex-wrap: wrap;
    gap: 14px;
  }
  .lanewave {
    width: 100%;
  }
}

/* ============ TRIGGER STRIP ============ */

.triggerstrip {
  background-color: #242A2F;
  border-top: 1px solid #2C3338;
  border-bottom: 1px solid #2C3338;
  padding: 26px 0;
}

.triggerstrip-inner {
  display: flex;
  align-items: center;
  gap: 22px;
}

.trigarrow {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 14px solid #46B86C;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  position: relative;
}

.trigarrow::after {
  content: "";
  position: absolute;
  left: 16px;
  top: -1px;
  width: 46px;
  height: 0;
  border-top: 2px dashed #46B86C;
}

.triggerstrip p {
  margin: 0;
  font-size: 16px;
  color: #E8E5D9;
}

/* ============ HOME CONTENT BLOCKS ============ */

.homebody {
  background-color: #1B1F22;
  padding: 60px 0 10px 0;
}

.blockrow {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  margin-bottom: 54px;
}

.blockrow.reverse {
  grid-template-columns: 0.85fr 1.15fr;
}

.blockcopy h2 {
  font-size: 29px;
  color: #E8E5D9;
  margin: 0 0 14px 0;
}

.blockcopy p {
  margin: 0 0 15px 0;
  font-size: 16px;
}

.sidepanel {
  background-color: #262C31;
  border: 1px solid #2C3338;
  border-left: 3px solid #46B86C;
  padding: 26px 24px;
}

.sidepanel h3 {
  font-size: 18px;
  color: #46B86C;
  margin: 0 0 12px 0;
  letter-spacing: 0.04em;
}

.sidepanel ul {
  margin: 0;
  padding-left: 18px;
}

.sidepanel li {
  margin-bottom: 9px;
  font-size: 15px;
}

.sidepanel li a {
  color: #46B86C;
}

.sidepanel li a:hover {
  color: #E8E5D9;
}

@media (max-width: 860px) {
  .blockrow,
  .blockrow.reverse {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ============ CTA BLOCK ============ */

.ctablock {
  background-color: #262C31;
  border: 1px solid #2C3338;
  padding: 44px 40px;
  margin-bottom: 58px;
}

.ctablock h2 {
  font-size: 30px;
  color: #E8E5D9;
  margin: 0 0 14px 0;
}

.ctablock p {
  max-width: 760px;
  margin: 0 0 22px 0;
}

.ctaband {
  display: block;
  width: 100%;
  background-color: #46B86C;
  color: #1B1F22;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 17px 24px;
  font-size: 15px;
}

.ctaband:hover {
  background-color: #E8E5D9;
  color: #1B1F22;
}

/* ============ TEST BENCH FOOTER ============ */

.benchfoot {
  background-color: #242A2F;
  border-top: 3px solid #46B86C;
  margin-top: 50px;
}

.benchfoot-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding: 52px 0 40px 0;
}

.probedock {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.probedock .bnc {
  width: 14px;
  height: 14px;
}

.probe-coil {
  width: 60px;
  height: 22px;
  border: 2px solid #46B86C;
  border-left: none;
  border-radius: 0 14px 14px 0;
}

.benchfoot-brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #E8E5D9;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.benchfoot-blurb {
  font-size: 14.5px;
  max-width: 340px;
  color: #E8E5D9;
}

.footcolhead {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #46B86C;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.studrow {
  display: inline-flex;
  gap: 5px;
}

.studrow i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #46B86C;
}

.footlinks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footlinks li {
  margin-bottom: 9px;
}

.footlinks a {
  color: #E8E5D9;
  font-size: 15px;
  border-bottom: 1px solid #31383E;
  padding-bottom: 2px;
}

.footlinks a:hover {
  color: #46B86C;
  border-bottom-color: #46B86C;
}

.benchfoot-strip {
  background-color: #262C31;
  border-top: 1px solid #2C3338;
}

.benchfoot-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
  font-size: 13.5px;
  color: #E8E5D9;
}

.stripmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.squarewave-glyph {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

@media (max-width: 860px) {
  .benchfoot-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ============ SERVICES / CONTACT SHARED ============ */

.pagehead {
  background-color: #1B1F22;
  padding: 60px 0 30px 0;
}

.pagehead h1 {
  font-size: 42px;
  color: #E8E5D9;
  margin: 0 0 14px 0;
}

.pagehead p {
  max-width: 780px;
  font-size: 17px;
  margin: 0;
}

.servicestack {
  background-color: #1B1F22;
  padding: 20px 0 30px 0;
}

.serviceentry {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 26px;
  border-top: 1px solid #2C3338;
  padding: 32px 0;
}

.serviceentry:last-of-type {
  border-bottom: 1px solid #2C3338;
}

.servtab {
  width: 56px;
  height: 56px;
  background-color: #262C31;
  border: 1px solid #46B86C;
  color: #46B86C;
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.serventry-body h2 {
  font-size: 24px;
  color: #E8E5D9;
  margin: 0 0 12px 0;
}

.serventry-body p {
  margin: 0 0 14px 0;
}

@media (max-width: 640px) {
  .serviceentry {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* process overview */
.procblock {
  background-color: #262C31;
  border: 1px solid #2C3338;
  padding: 40px;
  margin: 30px 0 50px 0;
}

.procblock h2 {
  font-size: 28px;
  color: #E8E5D9;
  margin: 0 0 16px 0;
}

.procsteps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 22px;
}

.procstep {
  background-color: #1B1F22;
  border-top: 3px solid #46B86C;
  padding: 20px 18px;
}

.procstep h3 {
  font-size: 16px;
  color: #46B86C;
  margin: 0 0 8px 0;
  letter-spacing: 0.04em;
}

.procstep p {
  font-size: 14px;
  margin: 0;
}

@media (max-width: 860px) {
  .procsteps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .procsteps {
    grid-template-columns: 1fr;
  }
}

/* ============ CONTACT ============ */

.contactgrid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  background-color: #1B1F22;
  padding: 10px 0 50px 0;
}

.cform {
  background-color: #262C31;
  border: 1px solid #2C3338;
  border-top: 3px solid #46B86C;
  padding: 32px 28px;
}

.cform h2 {
  font-size: 24px;
  color: #E8E5D9;
  margin: 0 0 20px 0;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #46B86C;
  margin-bottom: 7px;
}

.field input,
.field textarea {
  width: 100%;
  background-color: #1B1F22;
  border: 1px solid #31383E;
  color: #E8E5D9;
  font-size: 15px;
  font-family: inherit;
  padding: 12px 12px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: #46B86C;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.formsubmit {
  display: block;
  width: 100%;
  background-color: #46B86C;
  color: #1B1F22;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 15px;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
}

.formsubmit:hover {
  background-color: #E8E5D9;
}

.formnote {
  font-size: 13px;
  margin: 14px 0 0 0;
}

.contactinfo {
  background-color: #262C31;
  border: 1px solid #2C3338;
  padding: 32px 28px;
}

.contactinfo h2 {
  font-size: 24px;
  color: #E8E5D9;
  margin: 0 0 20px 0;
}

.infoblock {
  margin-bottom: 24px;
}

.infoblock h3 {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #46B86C;
  margin: 0 0 8px 0;
}

.infoblock p {
  margin: 0;
  font-size: 15px;
}

.infoblock a {
  color: #46B86C;
}

.infoblock a:hover {
  color: #E8E5D9;
}

.faqblock {
  background-color: #1B1F22;
  padding: 6px 0 50px 0;
}

.faqblock h2 {
  font-size: 30px;
  color: #E8E5D9;
  margin: 0 0 24px 0;
}

.faqitem {
  border-top: 1px solid #2C3338;
  padding: 20px 0;
}

.faqitem:last-child {
  border-bottom: 1px solid #2C3338;
}

.faqq {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #E8E5D9;
  font-size: 18px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.faqq:hover {
  color: #46B86C;
}

.faqmark {
  color: #46B86C;
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
}

.faqa {
  margin: 12px 0 0 0;
  font-size: 15.5px;
  max-width: 820px;
  display: none;
}

.faqitem.open .faqa {
  display: block;
}

@media (max-width: 860px) {
  .contactgrid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

/* ============ SCROLL REVEAL ============ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============ SMALL SCREEN TWEAKS ============ */

@media (max-width: 620px) {
  .herohead {
    font-size: 36px;
  }
  .herohead .displayword {
    font-size: 58px;
  }
  .pagehead h1 {
    font-size: 32px;
  }
  .tracesurface {
    height: 200px;
  }
  .ctablock {
    padding: 30px 22px;
  }
  .procblock {
    padding: 26px 22px;
  }
}
